From d965e8783d880d29e3fe0436703c8cca1ded0bc2 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 1 Apr 2026 21:07:00 +0000 Subject: [PATCH 1/2] feat: Added a fields for image and table annotation output feat: Update comments for proto fields PiperOrigin-RevId: 893028748 Source-Link: https://github.com/googleapis/googleapis/commit/280bed6c219637610d09cebf696958dd99fd2f76 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f1bd6d5615e4ac9b9a5015b2cb45c90ae1d901cd Copy-Tag: eyJwIjoiRG9jdW1lbnRBaS8uT3dsQm90LnlhbWwiLCJoIjoiZjFiZDZkNTYxNWU0YWM5YjlhNTAxNWIyY2I0NWM5MGFlMWQ5MDFjZCJ9 --- .../Google/Cloud/Documentai/V1/Barcode.php | 24 + .../Google/Cloud/Documentai/V1/Document.php | 35 + .../Google/Cloud/Documentai/V1/DocumentIo.php | 25 + .../V1/DocumentProcessorService.php | 40 + .../Cloud/Documentai/V1/DocumentSchema.php | 24 + .../Google/Cloud/Documentai/V1/Evaluation.php | 27 + .../Google/Cloud/Documentai/V1/Geometry.php | 24 + .../Cloud/Documentai/V1/OperationMetadata.php | 25 + .../Google/Cloud/Documentai/V1/Processor.php | 29 + .../Cloud/Documentai/V1/ProcessorType.php | 26 + .../Google/Cloud/DocumentAI/V1/Barcode.php | 255 ++ .../V1/BatchDocumentsInputConfig.php | 108 + .../DocumentAI/V1/BatchProcessMetadata.php | 228 ++ .../IndividualProcessStatus.php | 205 ++ .../V1/BatchProcessMetadata/State.php | 89 + .../DocumentAI/V1/BatchProcessRequest.php | 342 +++ .../DocumentAI/V1/BatchProcessResponse.php | 34 + .../Cloud/DocumentAI/V1/BoundingPoly.php | 101 + .../DocumentAI/V1/CommonOperationMetadata.php | 223 ++ .../V1/CommonOperationMetadata/State.php | 82 + .../DocumentAI/V1/CreateProcessorRequest.php | 161 ++ .../DocumentAI/V1/DeleteProcessorMetadata.php | 79 + .../DocumentAI/V1/DeleteProcessorRequest.php | 83 + .../V1/DeleteProcessorVersionMetadata.php | 79 + .../V1/DeleteProcessorVersionRequest.php | 83 + .../V1/DeployProcessorVersionMetadata.php | 79 + .../V1/DeployProcessorVersionRequest.php | 83 + .../V1/DeployProcessorVersionResponse.php | 35 + .../V1/DisableProcessorMetadata.php | 79 + .../DocumentAI/V1/DisableProcessorRequest.php | 69 + .../V1/DisableProcessorResponse.php | 35 + .../Google/Cloud/DocumentAI/V1/Document.php | 835 ++++++ .../DocumentAI/V1/Document/Annotations.php | 67 + .../DocumentAI/V1/Document/BlobAsset.php | 145 + .../V1/Document/ChunkedDocument.php | 67 + .../V1/Document/ChunkedDocument/Chunk.php | 281 ++ .../ChunkedDocument/Chunk/ChunkField.php | 109 + .../ChunkedDocument/Chunk/ChunkPageFooter.php | 111 + .../ChunkedDocument/Chunk/ChunkPageHeader.php | 111 + .../ChunkedDocument/Chunk/ChunkPageSpan.php | 101 + .../ChunkedDocument/Chunk/ImageChunkField.php | 200 ++ .../ChunkedDocument/Chunk/TableChunkField.php | 77 + .../DocumentAI/V1/Document/DocumentLayout.php | 68 + .../DocumentLayout/DocumentLayoutBlock.php | 297 ++ .../DocumentLayoutBlock/LayoutImageBlock.php | 276 ++ .../DocumentLayoutBlock/LayoutListBlock.php | 105 + .../DocumentLayoutBlock/LayoutListEntry.php | 71 + .../DocumentLayoutBlock/LayoutPageSpan.php | 101 + .../DocumentLayoutBlock/LayoutTableBlock.php | 179 ++ .../DocumentLayoutBlock/LayoutTableCell.php | 139 + .../DocumentLayoutBlock/LayoutTableRow.php | 67 + .../DocumentLayoutBlock/LayoutTextBlock.php | 191 ++ .../V1/Document/EntitiesRevision.php | 145 + .../Cloud/DocumentAI/V1/Document/Entity.php | 523 ++++ .../DocumentAI/V1/Document/Entity/Method.php | 63 + .../V1/Document/Entity/NormalizedValue.php | 390 +++ .../DocumentAI/V1/Document/EntityRelation.php | 136 + .../V1/Document/EntityValidationOutput.php | 105 + .../ValidationResult.php | 173 ++ .../ValidationResult/ValidationResultType.php | 75 + .../Cloud/DocumentAI/V1/Document/Page.php | 720 +++++ .../DocumentAI/V1/Document/Page/Block.php | 171 ++ .../V1/Document/Page/DetectedBarcode.php | 129 + .../V1/Document/Page/DetectedLanguage.php | 109 + .../DocumentAI/V1/Document/Page/Dimension.php | 135 + .../DocumentAI/V1/Document/Page/FormField.php | 379 +++ .../DocumentAI/V1/Document/Page/Image.php | 177 ++ .../V1/Document/Page/ImageQualityScores.php | 101 + .../ImageQualityScores/DetectedDefect.php | 137 + .../DocumentAI/V1/Document/Page/Layout.php | 217 ++ .../V1/Document/Page/Layout/Orientation.php | 78 + .../DocumentAI/V1/Document/Page/Line.php | 171 ++ .../DocumentAI/V1/Document/Page/Matrix.php | 182 ++ .../DocumentAI/V1/Document/Page/Paragraph.php | 170 ++ .../DocumentAI/V1/Document/Page/Symbol.php | 115 + .../DocumentAI/V1/Document/Page/Table.php | 238 ++ .../V1/Document/Page/Table/TableCell.php | 183 ++ .../V1/Document/Page/Table/TableRow.php | 67 + .../DocumentAI/V1/Document/Page/Token.php | 262 ++ .../V1/Document/Page/Token/DetectedBreak.php | 68 + .../Page/Token/DetectedBreak/Type.php | 68 + .../V1/Document/Page/Token/StyleInfo.php | 583 ++++ .../V1/Document/Page/VisualElement.php | 154 ++ .../DocumentAI/V1/Document/PageAnchor.php | 70 + .../V1/Document/PageAnchor/PageRef.php | 264 ++ .../PageAnchor/PageRef/LayoutType.php | 109 + .../DocumentAI/V1/Document/Provenance.php | 188 ++ .../V1/Document/Provenance/OperationType.php | 102 + .../V1/Document/Provenance/PBParent.php | 147 + .../Cloud/DocumentAI/V1/Document/Revision.php | 337 +++ .../V1/Document/Revision/HumanReview.php | 105 + .../DocumentAI/V1/Document/ShardInfo.php | 145 + .../Cloud/DocumentAI/V1/Document/Style.php | 374 +++ .../DocumentAI/V1/Document/Style/FontSize.php | 105 + .../DocumentAI/V1/Document/TextAnchor.php | 114 + .../V1/Document/TextAnchor/TextSegment.php | 121 + .../DocumentAI/V1/Document/TextChange.php | 174 ++ .../DocumentAI/V1/DocumentOutputConfig.php | 76 + .../DocumentOutputConfig/GcsOutputConfig.php | 163 ++ .../GcsOutputConfig/ShardingConfig.php | 101 + .../Cloud/DocumentAI/V1/DocumentSchema.php | 179 ++ .../V1/DocumentSchema/EntityType.php | 273 ++ .../DocumentSchema/EntityType/EnumValues.php | 67 + .../V1/DocumentSchema/EntityType/Property.php | 215 ++ .../EntityType/Property/Method.php | 63 + .../EntityType/Property/OccurrenceType.php | 85 + .../DocumentAI/V1/DocumentSchema/Metadata.php | 189 ++ .../DocumentAI/V1/EnableProcessorMetadata.php | 79 + .../DocumentAI/V1/EnableProcessorRequest.php | 69 + .../DocumentAI/V1/EnableProcessorResponse.php | 35 + .../V1/EvaluateProcessorVersionMetadata.php | 79 + .../V1/EvaluateProcessorVersionRequest.php | 146 + .../V1/EvaluateProcessorVersionResponse.php | 69 + .../Google/Cloud/DocumentAI/V1/Evaluation.php | 309 +++ .../V1/Evaluation/ConfidenceLevelMetrics.php | 111 + .../DocumentAI/V1/Evaluation/Counters.php | 177 ++ .../DocumentAI/V1/Evaluation/Metrics.php | 407 +++ .../V1/Evaluation/MultiConfidenceMetrics.php | 287 ++ .../MultiConfidenceMetrics/MetricsType.php | 60 + .../DocumentAI/V1/EvaluationReference.php | 189 ++ .../V1/FetchProcessorTypesRequest.php | 89 + .../V1/FetchProcessorTypesResponse.php | 69 + .../Cloud/DocumentAI/V1/GcsDocument.php | 101 + .../Cloud/DocumentAI/V1/GcsDocuments.php | 67 + .../Google/Cloud/DocumentAI/V1/GcsPrefix.php | 67 + .../DocumentAI/V1/GetEvaluationRequest.php | 91 + .../DocumentAI/V1/GetProcessorRequest.php | 83 + .../DocumentAI/V1/GetProcessorTypeRequest.php | 83 + .../V1/GetProcessorVersionRequest.php | 83 + .../Cloud/DocumentAI/V1/HumanReviewStatus.php | 155 ++ .../DocumentAI/V1/HumanReviewStatus/State.php | 79 + .../DocumentAI/V1/ListEvaluationsRequest.php | 177 ++ .../DocumentAI/V1/ListEvaluationsResponse.php | 105 + .../V1/ListProcessorTypesRequest.php | 165 ++ .../V1/ListProcessorTypesResponse.php | 103 + .../V1/ListProcessorVersionsRequest.php | 171 ++ .../V1/ListProcessorVersionsResponse.php | 103 + .../DocumentAI/V1/ListProcessorsRequest.php | 166 ++ .../DocumentAI/V1/ListProcessorsResponse.php | 103 + .../Cloud/DocumentAI/V1/NormalizedVertex.php | 103 + .../Google/Cloud/DocumentAI/V1/OcrConfig.php | 380 +++ .../Cloud/DocumentAI/V1/OcrConfig/Hints.php | 87 + .../V1/OcrConfig/PremiumFeatures.php | 139 + .../Cloud/DocumentAI/V1/ProcessOptions.php | 300 ++ .../ProcessOptions/IndividualPageSelector.php | 67 + .../V1/ProcessOptions/LayoutConfig.php | 217 ++ .../LayoutConfig/ChunkingConfig.php | 105 + .../Cloud/DocumentAI/V1/ProcessRequest.php | 457 ++++ .../Cloud/DocumentAI/V1/ProcessResponse.php | 127 + .../Google/Cloud/DocumentAI/V1/Processor.php | 438 +++ .../Cloud/DocumentAI/V1/Processor/State.php | 104 + .../Cloud/DocumentAI/V1/ProcessorType.php | 280 ++ .../V1/ProcessorType/LocationInfo.php | 71 + .../Cloud/DocumentAI/V1/ProcessorVersion.php | 582 ++++ .../V1/ProcessorVersion/DeprecationInfo.php | 111 + .../V1/ProcessorVersion/GenAiModelInfo.php | 108 + .../GenAiModelInfo/CustomGenAiModelInfo.php | 103 + .../CustomGenAiModelInfo/CustomModelType.php | 61 + .../FoundationGenAiModelInfo.php | 105 + .../V1/ProcessorVersion/ModelType.php | 61 + .../DocumentAI/V1/ProcessorVersion/State.php | 103 + .../DocumentAI/V1/ProcessorVersionAlias.php | 101 + .../Cloud/DocumentAI/V1/RawDocument.php | 155 ++ .../V1/ReviewDocumentOperationMetadata.php | 113 + .../DocumentAI/V1/ReviewDocumentRequest.php | 247 ++ .../V1/ReviewDocumentRequest/Priority.php | 59 + .../DocumentAI/V1/ReviewDocumentResponse.php | 141 + .../V1/ReviewDocumentResponse/State.php | 61 + .../V1/SetDefaultProcessorVersionMetadata.php | 79 + .../V1/SetDefaultProcessorVersionRequest.php | 123 + .../V1/SetDefaultProcessorVersionResponse.php | 35 + .../V1/TrainProcessorVersionMetadata.php | 165 ++ .../DatasetValidation.php | 186 ++ .../V1/TrainProcessorVersionRequest.php | 348 +++ .../CustomDocumentExtractionOptions.php | 68 + .../TrainingMethod.php | 56 + .../FoundationModelTuningOptions.php | 113 + .../InputData.php | 122 + .../V1/TrainProcessorVersionResponse.php | 68 + .../V1/UndeployProcessorVersionMetadata.php | 79 + .../V1/UndeployProcessorVersionRequest.php | 83 + .../V1/UndeployProcessorVersionResponse.php | 35 + .../src/Google/Cloud/DocumentAI/V1/Vertex.php | 102 + .../batch_process_documents.php | 88 + .../create_processor.php | 80 + .../delete_processor.php | 85 + .../delete_processor_version.php | 86 + .../deploy_processor_version.php | 88 + .../disable_processor.php | 87 + .../enable_processor.php | 87 + .../evaluate_processor_version.php | 92 + .../fetch_processor_types.php | 74 + .../get_evaluation.php | 79 + .../get_location.php | 57 + .../get_processor.php | 75 + .../get_processor_type.php | 75 + .../get_processor_version.php | 76 + .../list_evaluations.php | 84 + .../list_locations.php | 62 + .../list_processor_types.php | 77 + .../list_processor_versions.php | 82 + .../list_processors.php | 77 + .../process_document.php | 79 + .../review_document.php | 90 + .../set_default_processor_version.php | 107 + .../train_processor_version.php | 94 + .../undeploy_processor_version.php | 88 + .../Client/DocumentProcessorServiceClient.php | 1119 ++++++++ .../DocumentAi/v1/src/V1/gapic_metadata.json | 138 + ...ument_processor_service_client_config.json | 169 ++ ...nt_processor_service_descriptor_config.php | 443 +++ ...t_processor_service_rest_client_config.php | 389 +++ .../DocumentProcessorServiceClientTest.php | 2437 +++++++++++++++++ 213 files changed, 33788 insertions(+) create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Barcode.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Document.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/DocumentIo.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/DocumentProcessorService.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/DocumentSchema.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Evaluation.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Geometry.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/OperationMetadata.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Processor.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/ProcessorType.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Barcode.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchDocumentsInputConfig.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessMetadata.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessMetadata/IndividualProcessStatus.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessMetadata/State.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessRequest.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessResponse.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BoundingPoly.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/CommonOperationMetadata.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/CommonOperationMetadata/State.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/CreateProcessorRequest.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorMetadata.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorRequest.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorVersionMetadata.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorVersionRequest.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeployProcessorVersionMetadata.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeployProcessorVersionRequest.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeployProcessorVersionResponse.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DisableProcessorMetadata.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DisableProcessorRequest.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DisableProcessorResponse.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Annotations.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/BlobAsset.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ChunkField.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ChunkPageFooter.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ChunkPageHeader.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ChunkPageSpan.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ImageChunkField.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/TableChunkField.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutImageBlock.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutListBlock.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutListEntry.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutPageSpan.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTableBlock.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTableCell.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTableRow.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTextBlock.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntitiesRevision.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Entity.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Entity/Method.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Entity/NormalizedValue.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityRelation.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityValidationOutput.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityValidationOutput/ValidationResult.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityValidationOutput/ValidationResult/ValidationResultType.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Block.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/DetectedBarcode.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/DetectedLanguage.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Dimension.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/FormField.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Image.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/ImageQualityScores.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/ImageQualityScores/DetectedDefect.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Layout.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Layout/Orientation.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Line.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Matrix.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Paragraph.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Symbol.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Table.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Table/TableCell.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Table/TableRow.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token/DetectedBreak.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token/DetectedBreak/Type.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token/StyleInfo.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/VisualElement.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/PageAnchor.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/PageAnchor/PageRef.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/PageAnchor/PageRef/LayoutType.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Provenance.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Provenance/OperationType.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Provenance/PBParent.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Revision.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Revision/HumanReview.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ShardInfo.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Style.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Style/FontSize.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/TextAnchor.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/TextAnchor/TextSegment.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/TextChange.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentOutputConfig.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentOutputConfig/GcsOutputConfig.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentOutputConfig/GcsOutputConfig/ShardingConfig.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/EnumValues.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/Property.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/Property/Method.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/Property/OccurrenceType.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/Metadata.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EnableProcessorMetadata.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EnableProcessorRequest.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EnableProcessorResponse.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluateProcessorVersionMetadata.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluateProcessorVersionRequest.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluateProcessorVersionResponse.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/ConfidenceLevelMetrics.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/Counters.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/Metrics.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/MultiConfidenceMetrics.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/MultiConfidenceMetrics/MetricsType.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluationReference.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/FetchProcessorTypesRequest.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/FetchProcessorTypesResponse.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GcsDocument.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GcsDocuments.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GcsPrefix.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetEvaluationRequest.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetProcessorRequest.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetProcessorTypeRequest.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetProcessorVersionRequest.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/HumanReviewStatus.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/HumanReviewStatus/State.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListEvaluationsRequest.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListEvaluationsResponse.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorTypesRequest.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorTypesResponse.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorVersionsRequest.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorVersionsResponse.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorsRequest.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorsResponse.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/NormalizedVertex.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/OcrConfig.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/OcrConfig/Hints.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/OcrConfig/PremiumFeatures.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions/IndividualPageSelector.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions/LayoutConfig.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions/LayoutConfig/ChunkingConfig.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessRequest.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessResponse.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Processor.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Processor/State.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorType.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorType/LocationInfo.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/DeprecationInfo.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo/CustomGenAiModelInfo.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo/CustomGenAiModelInfo/CustomModelType.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo/FoundationGenAiModelInfo.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/ModelType.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/State.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersionAlias.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/RawDocument.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentOperationMetadata.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentRequest.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentRequest/Priority.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentResponse.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentResponse/State.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/SetDefaultProcessorVersionMetadata.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/SetDefaultProcessorVersionRequest.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/SetDefaultProcessorVersionResponse.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionMetadata.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionMetadata/DatasetValidation.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/CustomDocumentExtractionOptions.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/CustomDocumentExtractionOptions/TrainingMethod.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/FoundationModelTuningOptions.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/InputData.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionResponse.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/UndeployProcessorVersionMetadata.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/UndeployProcessorVersionRequest.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/UndeployProcessorVersionResponse.php create mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Vertex.php create mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/batch_process_documents.php create mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/create_processor.php create mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/delete_processor.php create mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/delete_processor_version.php create mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/deploy_processor_version.php create mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/disable_processor.php create mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/enable_processor.php create mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/evaluate_processor_version.php create mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/fetch_processor_types.php create mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_evaluation.php create mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_location.php create mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_processor.php create mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_processor_type.php create mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_processor_version.php create mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_evaluations.php create mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_locations.php create mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_processor_types.php create mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_processor_versions.php create mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_processors.php create mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/process_document.php create mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/review_document.php create mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/set_default_processor_version.php create mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/train_processor_version.php create mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/undeploy_processor_version.php create mode 100644 owl-bot-staging/DocumentAi/v1/src/V1/Client/DocumentProcessorServiceClient.php create mode 100644 owl-bot-staging/DocumentAi/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/DocumentAi/v1/src/V1/resources/document_processor_service_client_config.json create mode 100644 owl-bot-staging/DocumentAi/v1/src/V1/resources/document_processor_service_descriptor_config.php create mode 100644 owl-bot-staging/DocumentAi/v1/src/V1/resources/document_processor_service_rest_client_config.php create mode 100644 owl-bot-staging/DocumentAi/v1/tests/Unit/V1/Client/DocumentProcessorServiceClientTest.php diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Barcode.php b/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Barcode.php new file mode 100644 index 000000000000..0d7071556e0c --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Barcode.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\xDF\x02\x0A(google/cloud/documentai/v1/barcode.proto\x12\x1Agoogle.cloud.documentai.v1\"B\x0A\x07Barcode\x12\x0E\x0A\x06format\x18\x01 \x01(\x09\x12\x14\x0A\x0Cvalue_format\x18\x02 \x01(\x09\x12\x11\x0A\x09raw_value\x18\x03 \x01(\x09B\xCA\x01\x0A\x1Ecom.google.cloud.documentai.v1B\x0CBarcodeProtoP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xAA\x02\x1AGoogle.Cloud.DocumentAI.V1\xCA\x02\x1AGoogle\\Cloud\\DocumentAI\\V1\xEA\x02\x1DGoogle::Cloud::DocumentAI::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Document.php b/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Document.php new file mode 100644 index 000000000000..9ba73c628c19 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Document.php @@ -0,0 +1,35 @@ +internalAddGeneratedFile( + "\x0A\xEEp\x0A)google/cloud/documentai/v1/document.proto\x12\x1Agoogle.cloud.documentai.v1\x1A\x19google/api/resource.proto\x1A(google/cloud/documentai/v1/barcode.proto\x1A)google/cloud/documentai/v1/geometry.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x17google/rpc/status.proto\x1A\x17google/type/color.proto\x1A\x16google/type/date.proto\x1A\x1Agoogle/type/datetime.proto\x1A\x17google/type/money.proto\x1A google/type/postal_address.proto\"\x9Cl\x0A\x08Document\x12\x12\x0A\x03uri\x18\x01 \x01(\x09B\x03\xE0A\x01H\x00\x12\x16\x0A\x07content\x18\x02 \x01(\x0CB\x03\xE0A\x01H\x00\x12\x12\x0A\x05docid\x18\x0F \x01(\x09B\x03\xE0A\x01\x12\x11\x0A\x09mime_type\x18\x03 \x01(\x09\x12\x11\x0A\x04text\x18\x04 \x01(\x09B\x03\xE0A\x01\x12C\x0A\x0Btext_styles\x18\x05 \x03(\x0B2*.google.cloud.documentai.v1.Document.StyleB\x02\x18\x01\x128\x0A\x05pages\x18\x06 \x03(\x0B2).google.cloud.documentai.v1.Document.Page\x12=\x0A\x08entities\x18\x07 \x03(\x0B2+.google.cloud.documentai.v1.Document.Entity\x12M\x0A\x10entity_relations\x18\x08 \x03(\x0B23.google.cloud.documentai.v1.Document.EntityRelation\x12E\x0A\x0Ctext_changes\x18\x0E \x03(\x0B2/.google.cloud.documentai.v1.Document.TextChange\x12B\x0A\x0Ashard_info\x18\x09 \x01(\x0B2..google.cloud.documentai.v1.Document.ShardInfo\x12!\x0A\x05error\x18\x0A \x01(\x0B2\x12.google.rpc.Status\x12@\x0A\x09revisions\x18\x0D \x03(\x0B2-.google.cloud.documentai.v1.Document.Revision\x12L\x0A\x0Fdocument_layout\x18\x11 \x01(\x0B23.google.cloud.documentai.v1.Document.DocumentLayout\x12N\x0A\x10chunked_document\x18\x12 \x01(\x0B24.google.cloud.documentai.v1.Document.ChunkedDocument\x12H\x0A\x0Bblob_assets\x18\x13 \x03(\x0B2..google.cloud.documentai.v1.Document.BlobAssetB\x03\xE0A\x01\x12]\x0A\x18entity_validation_output\x18\x15 \x01(\x0B2;.google.cloud.documentai.v1.Document.EntityValidationOutput\x12Q\x0A\x12entities_revisions\x18\x16 \x03(\x0B25.google.cloud.documentai.v1.Document.EntitiesRevision\x12\x1C\x0A\x14entities_revision_id\x18\x17 \x01(\x09\x1AJ\x0A\x09ShardInfo\x12\x13\x0A\x0Bshard_index\x18\x01 \x01(\x03\x12\x13\x0A\x0Bshard_count\x18\x02 \x01(\x03\x12\x13\x0A\x0Btext_offset\x18\x03 \x01(\x03\x1A\xE5\x02\x0A\x05Style\x12D\x0A\x0Btext_anchor\x18\x01 \x01(\x0B2/.google.cloud.documentai.v1.Document.TextAnchor\x12!\x0A\x05color\x18\x02 \x01(\x0B2\x12.google.type.Color\x12,\x0A\x10background_color\x18\x03 \x01(\x0B2\x12.google.type.Color\x12\x13\x0A\x0Bfont_weight\x18\x04 \x01(\x09\x12\x12\x0A\x0Atext_style\x18\x05 \x01(\x09\x12\x17\x0A\x0Ftext_decoration\x18\x06 \x01(\x09\x12F\x0A\x09font_size\x18\x07 \x01(\x0B23.google.cloud.documentai.v1.Document.Style.FontSize\x12\x13\x0A\x0Bfont_family\x18\x08 \x01(\x09\x1A&\x0A\x08FontSize\x12\x0C\x0A\x04size\x18\x01 \x01(\x02\x12\x0C\x0A\x04unit\x18\x02 \x01(\x09\x1A\xC2)\x0A\x04Page\x12\x13\x0A\x0Bpage_number\x18\x01 \x01(\x05\x12>\x0A\x05image\x18\x0D \x01(\x0B2/.google.cloud.documentai.v1.Document.Page.Image\x12D\x0A\x0Atransforms\x18\x0E \x03(\x0B20.google.cloud.documentai.v1.Document.Page.Matrix\x12F\x0A\x09dimension\x18\x02 \x01(\x0B23.google.cloud.documentai.v1.Document.Page.Dimension\x12@\x0A\x06layout\x18\x03 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12V\x0A\x12detected_languages\x18\x04 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12?\x0A\x06blocks\x18\x05 \x03(\x0B2/.google.cloud.documentai.v1.Document.Page.Block\x12G\x0A\x0Aparagraphs\x18\x06 \x03(\x0B23.google.cloud.documentai.v1.Document.Page.Paragraph\x12=\x0A\x05lines\x18\x07 \x03(\x0B2..google.cloud.documentai.v1.Document.Page.Line\x12?\x0A\x06tokens\x18\x08 \x03(\x0B2/.google.cloud.documentai.v1.Document.Page.Token\x12P\x0A\x0Fvisual_elements\x18\x09 \x03(\x0B27.google.cloud.documentai.v1.Document.Page.VisualElement\x12?\x0A\x06tables\x18\x0A \x03(\x0B2/.google.cloud.documentai.v1.Document.Page.Table\x12H\x0A\x0Bform_fields\x18\x0B \x03(\x0B23.google.cloud.documentai.v1.Document.Page.FormField\x12A\x0A\x07symbols\x18\x0C \x03(\x0B20.google.cloud.documentai.v1.Document.Page.Symbol\x12T\x0A\x11detected_barcodes\x18\x0F \x03(\x0B29.google.cloud.documentai.v1.Document.Page.DetectedBarcode\x12Z\x0A\x14image_quality_scores\x18\x11 \x01(\x0B2<.google.cloud.documentai.v1.Document.Page.ImageQualityScores\x12G\x0A\x0Aprovenance\x18\x10 \x01(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1A8\x0A\x09Dimension\x12\x0D\x0A\x05width\x18\x01 \x01(\x02\x12\x0E\x0A\x06height\x18\x02 \x01(\x02\x12\x0C\x0A\x04unit\x18\x03 \x01(\x09\x1AJ\x0A\x05Image\x12\x0F\x0A\x07content\x18\x01 \x01(\x0C\x12\x11\x0A\x09mime_type\x18\x02 \x01(\x09\x12\x0D\x0A\x05width\x18\x03 \x01(\x05\x12\x0E\x0A\x06height\x18\x04 \x01(\x05\x1A@\x0A\x06Matrix\x12\x0C\x0A\x04rows\x18\x01 \x01(\x05\x12\x0C\x0A\x04cols\x18\x02 \x01(\x05\x12\x0C\x0A\x04type\x18\x03 \x01(\x05\x12\x0C\x0A\x04data\x18\x04 \x01(\x0C\x1A\xDD\x02\x0A\x06Layout\x12D\x0A\x0Btext_anchor\x18\x01 \x01(\x0B2/.google.cloud.documentai.v1.Document.TextAnchor\x12\x12\x0A\x0Aconfidence\x18\x02 \x01(\x02\x12?\x0A\x0Dbounding_poly\x18\x03 \x01(\x0B2(.google.cloud.documentai.v1.BoundingPoly\x12Q\x0A\x0Borientation\x18\x04 \x01(\x0E2<.google.cloud.documentai.v1.Document.Page.Layout.Orientation\"e\x0A\x0BOrientation\x12\x1B\x0A\x17ORIENTATION_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07PAGE_UP\x10\x01\x12\x0E\x0A\x0APAGE_RIGHT\x10\x02\x12\x0D\x0A\x09PAGE_DOWN\x10\x03\x12\x0D\x0A\x09PAGE_LEFT\x10\x04\x1A\xEA\x01\x0A\x05Block\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12V\x0A\x12detected_languages\x18\x02 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12G\x0A\x0Aprovenance\x18\x03 \x01(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1A\xEE\x01\x0A\x09Paragraph\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12V\x0A\x12detected_languages\x18\x02 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12G\x0A\x0Aprovenance\x18\x03 \x01(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1A\xE9\x01\x0A\x04Line\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12V\x0A\x12detected_languages\x18\x02 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12G\x0A\x0Aprovenance\x18\x03 \x01(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1A\x9E\x07\x0A\x05Token\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12U\x0A\x0Edetected_break\x18\x02 \x01(\x0B2=.google.cloud.documentai.v1.Document.Page.Token.DetectedBreak\x12V\x0A\x12detected_languages\x18\x03 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12G\x0A\x0Aprovenance\x18\x04 \x01(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x12M\x0A\x0Astyle_info\x18\x05 \x01(\x0B29.google.cloud.documentai.v1.Document.Page.Token.StyleInfo\x1A\xA6\x01\x0A\x0DDetectedBreak\x12P\x0A\x04type\x18\x01 \x01(\x0E2B.google.cloud.documentai.v1.Document.Page.Token.DetectedBreak.Type\"C\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x09\x0A\x05SPACE\x10\x01\x12\x0E\x0A\x0AWIDE_SPACE\x10\x02\x12\x0A\x0A\x06HYPHEN\x10\x03\x1A\xE2\x02\x0A\x09StyleInfo\x12\x11\x0A\x09font_size\x18\x01 \x01(\x05\x12\x17\x0A\x0Fpixel_font_size\x18\x02 \x01(\x01\x12\x16\x0A\x0Eletter_spacing\x18\x03 \x01(\x01\x12\x11\x0A\x09font_type\x18\x04 \x01(\x09\x12\x0C\x0A\x04bold\x18\x05 \x01(\x08\x12\x0E\x0A\x06italic\x18\x06 \x01(\x08\x12\x12\x0A\x0Aunderlined\x18\x07 \x01(\x08\x12\x11\x0A\x09strikeout\x18\x08 \x01(\x08\x12\x11\x0A\x09subscript\x18\x09 \x01(\x08\x12\x13\x0A\x0Bsuperscript\x18\x0A \x01(\x08\x12\x11\x0A\x09smallcaps\x18\x0B \x01(\x08\x12\x13\x0A\x0Bfont_weight\x18\x0C \x01(\x05\x12\x13\x0A\x0Bhandwritten\x18\x0D \x01(\x08\x12&\x0A\x0Atext_color\x18\x0E \x01(\x0B2\x12.google.type.Color\x12,\x0A\x10background_color\x18\x0F \x01(\x0B2\x12.google.type.Color\x1A\xA2\x01\x0A\x06Symbol\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12V\x0A\x12detected_languages\x18\x02 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x1A\xB7\x01\x0A\x0DVisualElement\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12\x0C\x0A\x04type\x18\x02 \x01(\x09\x12V\x0A\x12detected_languages\x18\x03 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x1A\xA8\x05\x0A\x05Table\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12M\x0A\x0Bheader_rows\x18\x02 \x03(\x0B28.google.cloud.documentai.v1.Document.Page.Table.TableRow\x12K\x0A\x09body_rows\x18\x03 \x03(\x0B28.google.cloud.documentai.v1.Document.Page.Table.TableRow\x12V\x0A\x12detected_languages\x18\x04 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12G\x0A\x0Aprovenance\x18\x05 \x01(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1AT\x0A\x08TableRow\x12H\x0A\x05cells\x18\x01 \x03(\x0B29.google.cloud.documentai.v1.Document.Page.Table.TableCell\x1A\xC9\x01\x0A\x09TableCell\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12\x10\x0A\x08row_span\x18\x02 \x01(\x05\x12\x10\x0A\x08col_span\x18\x03 \x01(\x05\x12V\x0A\x12detected_languages\x18\x04 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x1A\xE6\x03\x0A\x09FormField\x12D\x0A\x0Afield_name\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12E\x0A\x0Bfield_value\x18\x02 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12[\x0A\x17name_detected_languages\x18\x03 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12\\\x0A\x18value_detected_languages\x18\x04 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12\x12\x0A\x0Avalue_type\x18\x05 \x01(\x09\x12\x1A\x0A\x12corrected_key_text\x18\x06 \x01(\x09\x12\x1C\x0A\x14corrected_value_text\x18\x07 \x01(\x09\x12C\x0A\x0Aprovenance\x18\x08 \x01(\x0B2/.google.cloud.documentai.v1.Document.Provenance\x1A\x89\x01\x0A\x0FDetectedBarcode\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x124\x0A\x07barcode\x18\x02 \x01(\x0B2#.google.cloud.documentai.v1.Barcode\x1A=\x0A\x10DetectedLanguage\x12\x15\x0A\x0Dlanguage_code\x18\x01 \x01(\x09\x12\x12\x0A\x0Aconfidence\x18\x02 \x01(\x02\x1A\xC6\x01\x0A\x12ImageQualityScores\x12\x15\x0A\x0Dquality_score\x18\x01 \x01(\x02\x12e\x0A\x10detected_defects\x18\x02 \x03(\x0B2K.google.cloud.documentai.v1.Document.Page.ImageQualityScores.DetectedDefect\x1A2\x0A\x0EDetectedDefect\x12\x0C\x0A\x04type\x18\x01 \x01(\x09\x12\x12\x0A\x0Aconfidence\x18\x02 \x01(\x02\x1A\xEF\x07\x0A\x06Entity\x12I\x0A\x0Btext_anchor\x18\x01 \x01(\x0B2/.google.cloud.documentai.v1.Document.TextAnchorB\x03\xE0A\x01\x12\x11\x0A\x04type\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\x19\x0A\x0Cmention_text\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x17\x0A\x0Amention_id\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x17\x0A\x0Aconfidence\x18\x05 \x01(\x02B\x03\xE0A\x01\x12I\x0A\x0Bpage_anchor\x18\x06 \x01(\x0B2/.google.cloud.documentai.v1.Document.PageAnchorB\x03\xE0A\x01\x12\x0F\x0A\x02id\x18\x07 \x01(\x09B\x03\xE0A\x01\x12Z\x0A\x10normalized_value\x18\x09 \x01(\x0B2;.google.cloud.documentai.v1.Document.Entity.NormalizedValueB\x03\xE0A\x01\x12D\x0A\x0Aproperties\x18\x0A \x03(\x0B2+.google.cloud.documentai.v1.Document.EntityB\x03\xE0A\x01\x12H\x0A\x0Aprovenance\x18\x0B \x01(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x03\xE0A\x01\x12\x15\x0A\x08redacted\x18\x0C \x01(\x08B\x03\xE0A\x01\x12G\x0A\x06method\x18\x0F \x01(\x0E22.google.cloud.documentai.v1.Document.Entity.MethodB\x03\xE0A\x01\x1A\xD6\x02\x0A\x0FNormalizedValue\x12)\x0A\x0Bmoney_value\x18\x02 \x01(\x0B2\x12.google.type.MoneyH\x00\x12'\x0A\x0Adate_value\x18\x03 \x01(\x0B2\x11.google.type.DateH\x00\x12/\x0A\x0Edatetime_value\x18\x04 \x01(\x0B2\x15.google.type.DateTimeH\x00\x123\x0A\x0Daddress_value\x18\x05 \x01(\x0B2\x1A.google.type.PostalAddressH\x00\x12\x17\x0A\x0Dboolean_value\x18\x06 \x01(\x08H\x00\x12\x17\x0A\x0Dinteger_value\x18\x07 \x01(\x05H\x00\x12\x15\x0A\x0Bfloat_value\x18\x08 \x01(\x02H\x00\x12\x19\x0A\x0Fsignature_value\x18\x0A \x01(\x08H\x00\x12\x11\x0A\x04text\x18\x01 \x01(\x09B\x03\xE0A\x01B\x12\x0A\x10structured_value\"9\x0A\x06Method\x12\x16\x0A\x12METHOD_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07EXTRACT\x10\x01\x12\x0A\x0A\x06DERIVE\x10\x02\x1AI\x0A\x0EEntityRelation\x12\x12\x0A\x0Asubject_id\x18\x01 \x01(\x09\x12\x11\x0A\x09object_id\x18\x02 \x01(\x09\x12\x10\x0A\x08relation\x18\x03 \x01(\x09\x1A\xA8\x01\x0A\x0ATextAnchor\x12R\x0A\x0Dtext_segments\x18\x01 \x03(\x0B2;.google.cloud.documentai.v1.Document.TextAnchor.TextSegment\x12\x0F\x0A\x07content\x18\x02 \x01(\x09\x1A5\x0A\x0BTextSegment\x12\x13\x0A\x0Bstart_index\x18\x01 \x01(\x03\x12\x11\x0A\x09end_index\x18\x02 \x01(\x03\x1A\xD8\x03\x0A\x0APageAnchor\x12J\x0A\x09page_refs\x18\x01 \x03(\x0B27.google.cloud.documentai.v1.Document.PageAnchor.PageRef\x1A\xFD\x02\x0A\x07PageRef\x12\x11\x0A\x04page\x18\x01 \x01(\x03B\x03\xE0A\x02\x12\\\x0A\x0Blayout_type\x18\x02 \x01(\x0E2B.google.cloud.documentai.v1.Document.PageAnchor.PageRef.LayoutTypeB\x03\xE0A\x01\x12\x18\x0A\x09layout_id\x18\x03 \x01(\x09B\x05\x18\x01\xE0A\x01\x12D\x0A\x0Dbounding_poly\x18\x04 \x01(\x0B2(.google.cloud.documentai.v1.BoundingPolyB\x03\xE0A\x01\x12\x17\x0A\x0Aconfidence\x18\x05 \x01(\x02B\x03\xE0A\x01\"\x87\x01\x0A\x0ALayoutType\x12\x1B\x0A\x17LAYOUT_TYPE_UNSPECIFIED\x10\x00\x12\x09\x0A\x05BLOCK\x10\x01\x12\x0D\x0A\x09PARAGRAPH\x10\x02\x12\x08\x0A\x04LINE\x10\x03\x12\x09\x0A\x05TOKEN\x10\x04\x12\x12\x0A\x0EVISUAL_ELEMENT\x10\x05\x12\x09\x0A\x05TABLE\x10\x06\x12\x0E\x0A\x0AFORM_FIELD\x10\x07\x1A\xA8\x03\x0A\x0AProvenance\x12\x14\x0A\x08revision\x18\x01 \x01(\x05B\x02\x18\x01\x12\x0E\x0A\x02id\x18\x02 \x01(\x05B\x02\x18\x01\x12G\x0A\x07parents\x18\x03 \x03(\x0B26.google.cloud.documentai.v1.Document.Provenance.Parent\x12K\x0A\x04type\x18\x04 \x01(\x0E2=.google.cloud.documentai.v1.Document.Provenance.OperationType\x1A9\x0A\x06Parent\x12\x10\x0A\x08revision\x18\x01 \x01(\x05\x12\x0D\x0A\x05index\x18\x03 \x01(\x05\x12\x0E\x0A\x02id\x18\x02 \x01(\x05B\x02\x18\x01\"\xA2\x01\x0A\x0DOperationType\x12\x1E\x0A\x1AOPERATION_TYPE_UNSPECIFIED\x10\x00\x12\x07\x0A\x03ADD\x10\x01\x12\x0A\x0A\x06REMOVE\x10\x02\x12\x0A\x0A\x06UPDATE\x10\x07\x12\x0B\x0A\x07REPLACE\x10\x03\x12\x16\x0A\x0EEVAL_REQUESTED\x10\x04\x1A\x02\x08\x01\x12\x15\x0A\x0DEVAL_APPROVED\x10\x05\x1A\x02\x08\x01\x12\x14\x0A\x0CEVAL_SKIPPED\x10\x06\x1A\x02\x08\x01\x1A\xA5\x02\x0A\x08Revision\x12\x0F\x0A\x05agent\x18\x04 \x01(\x09H\x00\x12\x13\x0A\x09processor\x18\x05 \x01(\x09H\x00\x12\x0A\x0A\x02id\x18\x01 \x01(\x09\x12\x12\x0A\x06parent\x18\x02 \x03(\x05B\x02\x18\x01\x12\x12\x0A\x0Aparent_ids\x18\x07 \x03(\x09\x12/\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12O\x0A\x0Chuman_review\x18\x06 \x01(\x0B29.google.cloud.documentai.v1.Document.Revision.HumanReview\x1A3\x0A\x0BHumanReview\x12\x0D\x0A\x05state\x18\x01 \x01(\x09\x12\x15\x0A\x0Dstate_message\x18\x02 \x01(\x09B\x08\x0A\x06source\x1A\xB1\x01\x0A\x0ATextChange\x12D\x0A\x0Btext_anchor\x18\x01 \x01(\x0B2/.google.cloud.documentai.v1.Document.TextAnchor\x12\x14\x0A\x0Cchanged_text\x18\x02 \x01(\x09\x12G\x0A\x0Aprovenance\x18\x03 \x03(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1A\"\x0A\x0BAnnotations\x12\x13\x0A\x0Bdescription\x18\x01 \x01(\x09\x1A\xBE\x10\x0A\x0EDocumentLayout\x12W\x0A\x06blocks\x18\x01 \x03(\x0B2G.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock\x1A\xD2\x0F\x0A\x13DocumentLayoutBlock\x12m\x0A\x0Atext_block\x18\x02 \x01(\x0B2W.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlockH\x00\x12o\x0A\x0Btable_block\x18\x03 \x01(\x0B2X.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlockH\x00\x12m\x0A\x0Alist_block\x18\x04 \x01(\x0B2W.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlockH\x00\x12o\x0A\x0Bimage_block\x18\x07 \x01(\x0B2X.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlockH\x00\x12\x10\x0A\x08block_id\x18\x01 \x01(\x09\x12i\x0A\x09page_span\x18\x05 \x01(\x0B2V.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan\x12>\x0A\x0Cbounding_box\x18\x06 \x01(\x0B2(.google.cloud.documentai.v1.BoundingPoly\x1A6\x0A\x0ELayoutPageSpan\x12\x12\x0A\x0Apage_start\x18\x01 \x01(\x05\x12\x10\x0A\x08page_end\x18\x02 \x01(\x05\x1A\xCD\x01\x0A\x0FLayoutTextBlock\x12\x0C\x0A\x04text\x18\x01 \x01(\x09\x12\x0C\x0A\x04type\x18\x02 \x01(\x09\x12W\x0A\x06blocks\x18\x03 \x03(\x0B2G.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock\x12E\x0A\x0Bannotations\x18\x04 \x01(\x0B20.google.cloud.documentai.v1.Document.Annotations\x1A\xC2\x02\x0A\x10LayoutTableBlock\x12k\x0A\x0Bheader_rows\x18\x01 \x03(\x0B2V.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow\x12i\x0A\x09body_rows\x18\x02 \x03(\x0B2V.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow\x12\x0F\x0A\x07caption\x18\x03 \x01(\x09\x12E\x0A\x0Bannotations\x18\x04 \x01(\x0B20.google.cloud.documentai.v1.Document.Annotations\x1Ax\x0A\x0ELayoutTableRow\x12f\x0A\x05cells\x18\x01 \x03(\x0B2W.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell\x1A\x8E\x01\x0A\x0FLayoutTableCell\x12W\x0A\x06blocks\x18\x01 \x03(\x0B2G.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock\x12\x10\x0A\x08row_span\x18\x02 \x01(\x05\x12\x10\x0A\x08col_span\x18\x03 \x01(\x05\x1A\x8E\x01\x0A\x0FLayoutListBlock\x12m\x0A\x0Clist_entries\x18\x01 \x03(\x0B2W.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry\x12\x0C\x0A\x04type\x18\x02 \x01(\x09\x1Aj\x0A\x0FLayoutListEntry\x12W\x0A\x06blocks\x18\x01 \x03(\x0B2G.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock\x1A\xDF\x01\x0A\x10LayoutImageBlock\x12\x1C\x0A\x0Dblob_asset_id\x18\x04 \x01(\x09B\x03\xE0A\x01H\x00\x12\x16\x0A\x07gcs_uri\x18\x05 \x01(\x09B\x03\xE0A\x01H\x00\x12\x17\x0A\x08data_uri\x18\x06 \x01(\x09B\x03\xE0A\x01H\x00\x12\x11\x0A\x09mime_type\x18\x01 \x01(\x09\x12\x12\x0A\x0Aimage_text\x18\x02 \x01(\x09\x12E\x0A\x0Bannotations\x18\x03 \x01(\x0B20.google.cloud.documentai.v1.Document.AnnotationsB\x0E\x0A\x0Cimage_sourceB\x07\x0A\x05block\x1A\xD8\x0A\x0A\x0FChunkedDocument\x12J\x0A\x06chunks\x18\x01 \x03(\x0B2:.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk\x1A\xF8\x09\x0A\x05Chunk\x12\x10\x0A\x08chunk_id\x18\x01 \x01(\x09\x12\x18\x0A\x10source_block_ids\x18\x02 \x03(\x09\x12\x0F\x0A\x07content\x18\x03 \x01(\x09\x12[\x0A\x09page_span\x18\x04 \x01(\x0B2H.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan\x12`\x0A\x0Cpage_headers\x18\x05 \x03(\x0B2J.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader\x12`\x0A\x0Cpage_footers\x18\x06 \x03(\x0B2J.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter\x12[\x0A\x0Cchunk_fields\x18\x07 \x03(\x0B2E.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField\x1A5\x0A\x0DChunkPageSpan\x12\x12\x0A\x0Apage_start\x18\x01 \x01(\x05\x12\x10\x0A\x08page_end\x18\x02 \x01(\x05\x1A|\x0A\x0FChunkPageHeader\x12\x0C\x0A\x04text\x18\x01 \x01(\x09\x12[\x0A\x09page_span\x18\x02 \x01(\x0B2H.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan\x1A|\x0A\x0FChunkPageFooter\x12\x0C\x0A\x04text\x18\x01 \x01(\x09\x12[\x0A\x09page_span\x18\x02 \x01(\x0B2H.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan\x1A\xB7\x01\x0A\x0FImageChunkField\x12\x1C\x0A\x0Dblob_asset_id\x18\x01 \x01(\x09B\x03\xE0A\x01H\x00\x12\x16\x0A\x07gcs_uri\x18\x02 \x01(\x09B\x03\xE0A\x01H\x00\x12\x17\x0A\x08data_uri\x18\x03 \x01(\x09B\x03\xE0A\x01H\x00\x12E\x0A\x0Bannotations\x18\x04 \x01(\x0B20.google.cloud.documentai.v1.Document.AnnotationsB\x0E\x0A\x0Cimage_source\x1AX\x0A\x0FTableChunkField\x12E\x0A\x0Bannotations\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Annotations\x1A\xEC\x01\x0A\x0AChunkField\x12g\x0A\x11image_chunk_field\x18\x01 \x01(\x0B2J.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkFieldH\x00\x12g\x0A\x11table_chunk_field\x18\x02 \x01(\x0B2J.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkFieldH\x00B\x0C\x0A\x0Afield_type\x1AK\x0A\x09BlobAsset\x12\x15\x0A\x08asset_id\x18\x01 \x01(\x09B\x03\xE0A\x01\x12\x14\x0A\x07content\x18\x02 \x01(\x0CB\x03\xE0A\x01\x12\x11\x0A\x09mime_type\x18\x03 \x01(\x09\x1A\xD2\x04\x0A\x16EntityValidationOutput\x12h\x0A\x12validation_results\x18\x01 \x03(\x0B2L.google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult\x12\x16\x0A\x0Epass_all_rules\x18\x02 \x01(\x08\x1A\xB5\x03\x0A\x10ValidationResult\x12\x11\x0A\x09rule_name\x18\x01 \x01(\x09\x12\x18\x0A\x10rule_description\x18\x02 \x01(\x09\x12\x81\x01\x0A\x16validation_result_type\x18\x03 \x01(\x0E2a.google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult.ValidationResultType\x12\x1A\x0A\x12validation_details\x18\x04 \x01(\x09\"\xD3\x01\x0A\x14ValidationResultType\x12&\x0A\"VALIDATION_RESULT_TYPE_UNSPECIFIED\x10\x00\x12 \x0A\x1CVALIDATION_RESULT_TYPE_VALID\x10\x01\x12\"\x0A\x1EVALIDATION_RESULT_TYPE_INVALID\x10\x02\x12\"\x0A\x1EVALIDATION_RESULT_TYPE_SKIPPED\x10\x03\x12)\x0A%VALIDATION_RESULT_TYPE_NOT_APPLICABLE\x10\x04\x1A\xC5\x01\x0A\x10EntitiesRevision\x12\x13\x0A\x0Brevision_id\x18\x01 \x01(\x09\x12=\x0A\x08entities\x18\x02 \x03(\x0B2+.google.cloud.documentai.v1.Document.Entity\x12]\x0A\x18entity_validation_output\x18\x03 \x01(\x0B2;.google.cloud.documentai.v1.Document.EntityValidationOutputB\x08\x0A\x06sourceB\xCB\x01\x0A\x1Ecom.google.cloud.documentai.v1B\x0DDocumentProtoP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xAA\x02\x1AGoogle.Cloud.DocumentAI.V1\xCA\x02\x1AGoogle\\Cloud\\DocumentAI\\V1\xEA\x02\x1DGoogle::Cloud::DocumentAI::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/DocumentIo.php b/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/DocumentIo.php new file mode 100644 index 000000000000..e010f4387ccf --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/DocumentIo.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xB4\x0C\x0A,google/cloud/documentai/v1/document_io.proto\x12\x1Agoogle.cloud.documentai.v1\"G\x0A\x0BRawDocument\x12\x0F\x0A\x07content\x18\x01 \x01(\x0C\x12\x11\x0A\x09mime_type\x18\x02 \x01(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x03 \x01(\x09\"1\x0A\x0BGcsDocument\x12\x0F\x0A\x07gcs_uri\x18\x01 \x01(\x09\x12\x11\x0A\x09mime_type\x18\x02 \x01(\x09\"J\x0A\x0CGcsDocuments\x12:\x0A\x09documents\x18\x01 \x03(\x0B2'.google.cloud.documentai.v1.GcsDocument\"#\x0A\x09GcsPrefix\x12\x16\x0A\x0Egcs_uri_prefix\x18\x01 \x01(\x09\"\xA5\x01\x0A\x19BatchDocumentsInputConfig\x12;\x0A\x0Agcs_prefix\x18\x01 \x01(\x0B2%.google.cloud.documentai.v1.GcsPrefixH\x00\x12A\x0A\x0Dgcs_documents\x18\x02 \x01(\x0B2(.google.cloud.documentai.v1.GcsDocumentsH\x00B\x08\x0A\x06source\"\x85\x03\x0A\x14DocumentOutputConfig\x12]\x0A\x11gcs_output_config\x18\x01 \x01(\x0B2@.google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfigH\x00\x1A\xFE\x01\x0A\x0FGcsOutputConfig\x12\x0F\x0A\x07gcs_uri\x18\x01 \x01(\x09\x12.\x0A\x0Afield_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\x12h\x0A\x0Fsharding_config\x18\x03 \x01(\x0B2O.google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.ShardingConfig\x1A@\x0A\x0EShardingConfig\x12\x17\x0A\x0Fpages_per_shard\x18\x01 \x01(\x05\x12\x15\x0A\x0Dpages_overlap\x18\x02 \x01(\x05B\x0D\x0A\x0Bdestination\"\xF2\x03\x0A\x09OcrConfig\x12:\x0A\x05hints\x18\x02 \x01(\x0B2+.google.cloud.documentai.v1.OcrConfig.Hints\x12!\x0A\x19enable_native_pdf_parsing\x18\x03 \x01(\x08\x12#\x0A\x1Benable_image_quality_scores\x18\x04 \x01(\x08\x12\x1C\x0A\x14advanced_ocr_options\x18\x05 \x03(\x09\x12\x15\x0A\x0Denable_symbol\x18\x06 \x01(\x08\x12\x1E\x0A\x12compute_style_info\x18\x08 \x01(\x08B\x02\x18\x01\x12)\x0A!disable_character_boxes_detection\x18\x0A \x01(\x08\x12O\x0A\x10premium_features\x18\x0B \x01(\x0B25.google.cloud.documentai.v1.OcrConfig.PremiumFeatures\x1A\x1F\x0A\x05Hints\x12\x16\x0A\x0Elanguage_hints\x18\x01 \x03(\x09\x1Ao\x0A\x0FPremiumFeatures\x12'\x0A\x1Fenable_selection_mark_detection\x18\x03 \x01(\x08\x12\x1A\x0A\x12compute_style_info\x18\x04 \x01(\x08\x12\x17\x0A\x0Fenable_math_ocr\x18\x05 \x01(\x08B\xCD\x01\x0A\x1Ecom.google.cloud.documentai.v1B\x0FDocumentIoProtoP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xAA\x02\x1AGoogle.Cloud.DocumentAI.V1\xCA\x02\x1AGoogle\\Cloud\\DocumentAI\\V1\xEA\x02\x1DGoogle::Cloud::DocumentAI::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/DocumentProcessorService.php b/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/DocumentProcessorService.php new file mode 100644 index 000000000000..b9a0ccf98cc7 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/DocumentProcessorService.php @@ -0,0 +1,40 @@ +internalAddGeneratedFile( + "\x0A\xF2y\x0A;google/cloud/documentai/v1/document_processor_service.proto\x12\x1Agoogle.cloud.documentai.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A)google/cloud/documentai/v1/document.proto\x1A,google/cloud/documentai/v1/document_io.proto\x1A0google/cloud/documentai/v1/document_schema.proto\x1A+google/cloud/documentai/v1/evaluation.proto\x1A3google/cloud/documentai/v1/operation_metadata.proto\x1A*google/cloud/documentai/v1/processor.proto\x1A/google/cloud/documentai/v1/processor_type.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x17google/rpc/status.proto\"\x8D\x06\x0A\x0EProcessOptions\x12e\x0A\x18individual_page_selector\x18\x05 \x01(\x0B2A.google.cloud.documentai.v1.ProcessOptions.IndividualPageSelectorH\x00\x12\x14\x0A\x0Afrom_start\x18\x06 \x01(\x05H\x00\x12\x12\x0A\x08from_end\x18\x07 \x01(\x05H\x00\x129\x0A\x0Aocr_config\x18\x01 \x01(\x0B2%.google.cloud.documentai.v1.OcrConfig\x12S\x0A\x0Dlayout_config\x18\x09 \x01(\x0B27.google.cloud.documentai.v1.ProcessOptions.LayoutConfigB\x03\xE0A\x01\x12H\x0A\x0Fschema_override\x18\x08 \x01(\x0B2*.google.cloud.documentai.v1.DocumentSchemaB\x03\xE0A\x01\x1A\xD3\x02\x0A\x0CLayoutConfig\x12d\x0A\x0Fchunking_config\x18\x01 \x01(\x0B2F.google.cloud.documentai.v1.ProcessOptions.LayoutConfig.ChunkingConfigB\x03\xE0A\x01\x12\x1A\x0A\x0Dreturn_images\x18\x02 \x01(\x08B\x03\xE0A\x01\x12\"\x0A\x15return_bounding_boxes\x18\x03 \x01(\x08B\x03\xE0A\x01\x12\$\x0A\x17enable_image_annotation\x18\x04 \x01(\x08B\x03\xE0A\x01\x12\$\x0A\x17enable_table_annotation\x18\x06 \x01(\x08B\x03\xE0A\x01\x1AQ\x0A\x0EChunkingConfig\x12\x17\x0A\x0Achunk_size\x18\x01 \x01(\x05B\x03\xE0A\x01\x12&\x0A\x19include_ancestor_headings\x18\x02 \x01(\x08B\x03\xE0A\x01\x1A,\x0A\x16IndividualPageSelector\x12\x12\x0A\x05pages\x18\x01 \x03(\x05B\x03\xE0A\x01B\x0C\x0A\x0Apage_range\"\x9F\x04\x0A\x0EProcessRequest\x12?\x0A\x0Finline_document\x18\x04 \x01(\x0B2\$.google.cloud.documentai.v1.DocumentH\x00\x12?\x0A\x0Craw_document\x18\x05 \x01(\x0B2'.google.cloud.documentai.v1.RawDocumentH\x00\x12?\x0A\x0Cgcs_document\x18\x08 \x01(\x0B2'.google.cloud.documentai.v1.GcsDocumentH\x00\x12\x17\x0A\x04name\x18\x01 \x01(\x09B\x09\xE0A\x02\xFAA\x03\x0A\x01*\x12\x19\x0A\x11skip_human_review\x18\x03 \x01(\x08\x12.\x0A\x0Afield_mask\x18\x06 \x01(\x0B2\x1A.google.protobuf.FieldMask\x12C\x0A\x0Fprocess_options\x18\x07 \x01(\x0B2*.google.cloud.documentai.v1.ProcessOptions\x12K\x0A\x06labels\x18\x0A \x03(\x0B26.google.cloud.documentai.v1.ProcessRequest.LabelsEntryB\x03\xE0A\x01\x12\x1B\x0A\x0Eimageless_mode\x18\x0B \x01(\x08B\x03\xE0A\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01B\x08\x0A\x06source\"\xEE\x01\x0A\x11HumanReviewStatus\x12B\x0A\x05state\x18\x01 \x01(\x0E23.google.cloud.documentai.v1.HumanReviewStatus.State\x12\x15\x0A\x0Dstate_message\x18\x02 \x01(\x09\x12\x1E\x0A\x16human_review_operation\x18\x03 \x01(\x09\"^\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07SKIPPED\x10\x01\x12\x15\x0A\x11VALIDATION_PASSED\x10\x02\x12\x0F\x0A\x0BIN_PROGRESS\x10\x03\x12\x09\x0A\x05ERROR\x10\x04\"\x95\x01\x0A\x0FProcessResponse\x126\x0A\x08document\x18\x01 \x01(\x0B2\$.google.cloud.documentai.v1.Document\x12J\x0A\x13human_review_status\x18\x03 \x01(\x0B2-.google.cloud.documentai.v1.HumanReviewStatus\"\xB1\x03\x0A\x13BatchProcessRequest\x12\x17\x0A\x04name\x18\x01 \x01(\x09B\x09\xE0A\x02\xFAA\x03\x0A\x01*\x12N\x0A\x0Finput_documents\x18\x05 \x01(\x0B25.google.cloud.documentai.v1.BatchDocumentsInputConfig\x12P\x0A\x16document_output_config\x18\x06 \x01(\x0B20.google.cloud.documentai.v1.DocumentOutputConfig\x12\x19\x0A\x11skip_human_review\x18\x04 \x01(\x08\x12C\x0A\x0Fprocess_options\x18\x07 \x01(\x0B2*.google.cloud.documentai.v1.ProcessOptions\x12P\x0A\x06labels\x18\x09 \x03(\x0B2;.google.cloud.documentai.v1.BatchProcessRequest.LabelsEntryB\x03\xE0A\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\x16\x0A\x14BatchProcessResponse\"\xFF\x04\x0A\x14BatchProcessMetadata\x12E\x0A\x05state\x18\x01 \x01(\x0E26.google.cloud.documentai.v1.BatchProcessMetadata.State\x12\x15\x0A\x0Dstate_message\x18\x02 \x01(\x09\x12/\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12/\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12m\x0A\x1Bindividual_process_statuses\x18\x05 \x03(\x0B2H.google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus\x1A\xC3\x01\x0A\x17IndividualProcessStatus\x12\x18\x0A\x10input_gcs_source\x18\x01 \x01(\x09\x12\"\x0A\x06status\x18\x02 \x01(\x0B2\x12.google.rpc.Status\x12\x1E\x0A\x16output_gcs_destination\x18\x03 \x01(\x09\x12J\x0A\x13human_review_status\x18\x05 \x01(\x0B2-.google.cloud.documentai.v1.HumanReviewStatus\"r\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07WAITING\x10\x01\x12\x0B\x0A\x07RUNNING\x10\x02\x12\x0D\x0A\x09SUCCEEDED\x10\x03\x12\x0E\x0A\x0ACANCELLING\x10\x04\x12\x0D\x0A\x09CANCELLED\x10\x05\x12\x0A\x0A\x06FAILED\x10\x06\"]\x0A\x1AFetchProcessorTypesRequest\x12?\x0A\x06parent\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x12'documentai.googleapis.com/ProcessorType\"a\x0A\x1BFetchProcessorTypesResponse\x12B\x0A\x0Fprocessor_types\x18\x01 \x03(\x0B2).google.cloud.documentai.v1.ProcessorType\"\x83\x01\x0A\x19ListProcessorTypesRequest\x12?\x0A\x06parent\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x12'documentai.googleapis.com/ProcessorType\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"y\x0A\x1AListProcessorTypesResponse\x12B\x0A\x0Fprocessor_types\x18\x01 \x03(\x0B2).google.cloud.documentai.v1.ProcessorType\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"{\x0A\x15ListProcessorsRequest\x12;\x0A\x06parent\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x12#documentai.googleapis.com/Processor\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"l\x0A\x16ListProcessorsResponse\x129\x0A\x0Aprocessors\x18\x01 \x03(\x0B2%.google.cloud.documentai.v1.Processor\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"X\x0A\x17GetProcessorTypeRequest\x12=\x0A\x04name\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x0A'documentai.googleapis.com/ProcessorType\"P\x0A\x13GetProcessorRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#documentai.googleapis.com/Processor\"^\x0A\x1AGetProcessorVersionRequest\x12@\x0A\x04name\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x0A*documentai.googleapis.com/ProcessorVersion\"\x89\x01\x0A\x1CListProcessorVersionsRequest\x12B\x0A\x06parent\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x12*documentai.googleapis.com/ProcessorVersion\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\x82\x01\x0A\x1DListProcessorVersionsResponse\x12H\x0A\x12processor_versions\x18\x01 \x03(\x0B2,.google.cloud.documentai.v1.ProcessorVersion\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"a\x0A\x1DDeleteProcessorVersionRequest\x12@\x0A\x04name\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x0A*documentai.googleapis.com/ProcessorVersion\"n\x0A\x1EDeleteProcessorVersionMetadata\x12L\x0A\x0Fcommon_metadata\x18\x01 \x01(\x0B23.google.cloud.documentai.v1.CommonOperationMetadata\"a\x0A\x1DDeployProcessorVersionRequest\x12@\x0A\x04name\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x0A*documentai.googleapis.com/ProcessorVersion\" \x0A\x1EDeployProcessorVersionResponse\"n\x0A\x1EDeployProcessorVersionMetadata\x12L\x0A\x0Fcommon_metadata\x18\x01 \x01(\x0B23.google.cloud.documentai.v1.CommonOperationMetadata\"c\x0A\x1FUndeployProcessorVersionRequest\x12@\x0A\x04name\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x0A*documentai.googleapis.com/ProcessorVersion\"\"\x0A UndeployProcessorVersionResponse\"p\x0A UndeployProcessorVersionMetadata\x12L\x0A\x0Fcommon_metadata\x18\x01 \x01(\x0B23.google.cloud.documentai.v1.CommonOperationMetadata\"\x94\x01\x0A\x16CreateProcessorRequest\x12;\x0A\x06parent\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x12#documentai.googleapis.com/Processor\x12=\x0A\x09processor\x18\x02 \x01(\x0B2%.google.cloud.documentai.v1.ProcessorB\x03\xE0A\x02\"S\x0A\x16DeleteProcessorRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#documentai.googleapis.com/Processor\"g\x0A\x17DeleteProcessorMetadata\x12L\x0A\x0Fcommon_metadata\x18\x05 \x01(\x0B23.google.cloud.documentai.v1.CommonOperationMetadata\"S\x0A\x16EnableProcessorRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#documentai.googleapis.com/Processor\"\x19\x0A\x17EnableProcessorResponse\"g\x0A\x17EnableProcessorMetadata\x12L\x0A\x0Fcommon_metadata\x18\x05 \x01(\x0B23.google.cloud.documentai.v1.CommonOperationMetadata\"T\x0A\x17DisableProcessorRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#documentai.googleapis.com/Processor\"\x1A\x0A\x18DisableProcessorResponse\"h\x0A\x18DisableProcessorMetadata\x12L\x0A\x0Fcommon_metadata\x18\x05 \x01(\x0B23.google.cloud.documentai.v1.CommonOperationMetadata\"\xBA\x01\x0A!SetDefaultProcessorVersionRequest\x12>\x0A\x09processor\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#documentai.googleapis.com/Processor\x12U\x0A\x19default_processor_version\x18\x02 \x01(\x09B2\xE0A\x02\xFAA,\x0A*documentai.googleapis.com/ProcessorVersion\"\$\x0A\"SetDefaultProcessorVersionResponse\"r\x0A\"SetDefaultProcessorVersionMetadata\x12L\x0A\x0Fcommon_metadata\x18\x01 \x01(\x0B23.google.cloud.documentai.v1.CommonOperationMetadata\"\xA9\x09\x0A\x1CTrainProcessorVersionRequest\x12\x86\x01\x0A\"custom_document_extraction_options\x18\x05 \x01(\x0B2X.google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptionsH\x00\x12\x80\x01\x0A\x1Ffoundation_model_tuning_options\x18\x0C \x01(\x0B2U.google.cloud.documentai.v1.TrainProcessorVersionRequest.FoundationModelTuningOptionsH\x00\x12;\x0A\x06parent\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#documentai.googleapis.com/Processor\x12L\x0A\x11processor_version\x18\x02 \x01(\x0B2,.google.cloud.documentai.v1.ProcessorVersionB\x03\xE0A\x02\x12H\x0A\x0Fdocument_schema\x18\x0A \x01(\x0B2*.google.cloud.documentai.v1.DocumentSchemaB\x03\xE0A\x01\x12[\x0A\x0Ainput_data\x18\x04 \x01(\x0B2B.google.cloud.documentai.v1.TrainProcessorVersionRequest.InputDataB\x03\xE0A\x01\x12#\x0A\x16base_processor_version\x18\x08 \x01(\x09B\x03\xE0A\x01\x1A\xAD\x01\x0A\x09InputData\x12Q\x0A\x12training_documents\x18\x03 \x01(\x0B25.google.cloud.documentai.v1.BatchDocumentsInputConfig\x12M\x0A\x0Etest_documents\x18\x04 \x01(\x0B25.google.cloud.documentai.v1.BatchDocumentsInputConfig\x1A\x81\x02\x0A\x1FCustomDocumentExtractionOptions\x12\x85\x01\x0A\x0Ftraining_method\x18\x03 \x01(\x0E2g.google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions.TrainingMethodB\x03\xE0A\x01\"V\x0A\x0ETrainingMethod\x12\x1F\x0A\x1BTRAINING_METHOD_UNSPECIFIED\x10\x00\x12\x0F\x0A\x0BMODEL_BASED\x10\x01\x12\x12\x0A\x0ETEMPLATE_BASED\x10\x02\x1A_\x0A\x1CFoundationModelTuningOptions\x12\x18\x0A\x0Btrain_steps\x18\x02 \x01(\x05B\x03\xE0A\x01\x12%\x0A\x18learning_rate_multiplier\x18\x03 \x01(\x02B\x03\xE0A\x01B\x11\x0A\x0Fprocessor_flags\":\x0A\x1DTrainProcessorVersionResponse\x12\x19\x0A\x11processor_version\x18\x01 \x01(\x09\"\xF7\x03\x0A\x1DTrainProcessorVersionMetadata\x12L\x0A\x0Fcommon_metadata\x18\x01 \x01(\x0B23.google.cloud.documentai.v1.CommonOperationMetadata\x12p\x0A\x1Btraining_dataset_validation\x18\x02 \x01(\x0B2K.google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation\x12l\x0A\x17test_dataset_validation\x18\x03 \x01(\x0B2K.google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation\x1A\xA7\x01\x0A\x11DatasetValidation\x12\x1C\x0A\x14document_error_count\x18\x03 \x01(\x05\x12\x1B\x0A\x13dataset_error_count\x18\x04 \x01(\x05\x12+\x0A\x0Fdocument_errors\x18\x01 \x03(\x0B2\x12.google.rpc.Status\x12*\x0A\x0Edataset_errors\x18\x02 \x03(\x0B2\x12.google.rpc.Status\"\x8E\x03\x0A\x15ReviewDocumentRequest\x12?\x0A\x0Finline_document\x18\x04 \x01(\x0B2\$.google.cloud.documentai.v1.DocumentH\x00\x12P\x0A\x13human_review_config\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+documentai.googleapis.com/HumanReviewConfig\x12 \x0A\x18enable_schema_validation\x18\x03 \x01(\x08\x12L\x0A\x08priority\x18\x05 \x01(\x0E2:.google.cloud.documentai.v1.ReviewDocumentRequest.Priority\x12C\x0A\x0Fdocument_schema\x18\x06 \x01(\x0B2*.google.cloud.documentai.v1.DocumentSchema\"#\x0A\x08Priority\x12\x0B\x0A\x07DEFAULT\x10\x00\x12\x0A\x0A\x06URGENT\x10\x01B\x08\x0A\x06source\"\xD1\x01\x0A\x16ReviewDocumentResponse\x12\x17\x0A\x0Fgcs_destination\x18\x01 \x01(\x09\x12G\x0A\x05state\x18\x02 \x01(\x0E28.google.cloud.documentai.v1.ReviewDocumentResponse.State\x12\x18\x0A\x10rejection_reason\x18\x03 \x01(\x09\";\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08REJECTED\x10\x01\x12\x0D\x0A\x09SUCCEEDED\x10\x02\"\x84\x01\x0A\x1FReviewDocumentOperationMetadata\x12L\x0A\x0Fcommon_metadata\x18\x05 \x01(\x0B23.google.cloud.documentai.v1.CommonOperationMetadata\x12\x13\x0A\x0Bquestion_id\x18\x06 \x01(\x09\"\xCA\x01\x0A\x1FEvaluateProcessorVersionRequest\x12M\x0A\x11processor_version\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x0A*documentai.googleapis.com/ProcessorVersion\x12X\x0A\x14evaluation_documents\x18\x03 \x01(\x0B25.google.cloud.documentai.v1.BatchDocumentsInputConfigB\x03\xE0A\x01\"p\x0A EvaluateProcessorVersionMetadata\x12L\x0A\x0Fcommon_metadata\x18\x01 \x01(\x0B23.google.cloud.documentai.v1.CommonOperationMetadata\"6\x0A EvaluateProcessorVersionResponse\x12\x12\x0A\x0Aevaluation\x18\x02 \x01(\x09\"R\x0A\x14GetEvaluationRequest\x12:\x0A\x04name\x18\x01 \x01(\x09B,\xE0A\x02\xFAA&\x0A\$documentai.googleapis.com/Evaluation\"\x83\x01\x0A\x16ListEvaluationsRequest\x12B\x0A\x06parent\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x0A*documentai.googleapis.com/ProcessorVersion\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"o\x0A\x17ListEvaluationsResponse\x12;\x0A\x0Bevaluations\x18\x01 \x03(\x0B2&.google.cloud.documentai.v1.Evaluation\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x092\x9C*\x0A\x18DocumentProcessorService\x12\x87\x02\x0A\x0FProcessDocument\x12*.google.cloud.documentai.v1.ProcessRequest\x1A+.google.cloud.documentai.v1.ProcessResponse\"\x9A\x01\xDAA\x04name\x82\xD3\xE4\x93\x02\x8C\x01\"6/v1/{name=projects/*/locations/*/processors/*}:process:\x01*ZO\"J/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}:process:\x01*\x12\xBD\x02\x0A\x15BatchProcessDocuments\x12/.google.cloud.documentai.v1.BatchProcessRequest\x1A\x1D.google.longrunning.Operation\"\xD3\x01\xCAA,\x0A\x14BatchProcessResponse\x12\x14BatchProcessMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02\x96\x01\";/v1/{name=projects/*/locations/*/processors/*}:batchProcess:\x01*ZT\"O/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}:batchProcess:\x01*\x12\xD0\x01\x0A\x13FetchProcessorTypes\x126.google.cloud.documentai.v1.FetchProcessorTypesRequest\x1A7.google.cloud.documentai.v1.FetchProcessorTypesResponse\"H\xDAA\x06parent\x82\xD3\xE4\x93\x029\x127/v1/{parent=projects/*/locations/*}:fetchProcessorTypes\x12\xC8\x01\x0A\x12ListProcessorTypes\x125.google.cloud.documentai.v1.ListProcessorTypesRequest\x1A6.google.cloud.documentai.v1.ListProcessorTypesResponse\"C\xDAA\x06parent\x82\xD3\xE4\x93\x024\x122/v1/{parent=projects/*/locations/*}/processorTypes\x12\xB5\x01\x0A\x10GetProcessorType\x123.google.cloud.documentai.v1.GetProcessorTypeRequest\x1A).google.cloud.documentai.v1.ProcessorType\"A\xDAA\x04name\x82\xD3\xE4\x93\x024\x122/v1/{name=projects/*/locations/*/processorTypes/*}\x12\xB8\x01\x0A\x0EListProcessors\x121.google.cloud.documentai.v1.ListProcessorsRequest\x1A2.google.cloud.documentai.v1.ListProcessorsResponse\"?\xDAA\x06parent\x82\xD3\xE4\x93\x020\x12./v1/{parent=projects/*/locations/*}/processors\x12\xA5\x01\x0A\x0CGetProcessor\x12/.google.cloud.documentai.v1.GetProcessorRequest\x1A%.google.cloud.documentai.v1.Processor\"=\xDAA\x04name\x82\xD3\xE4\x93\x020\x12./v1/{name=projects/*/locations/*/processors/*}\x12\xA2\x02\x0A\x15TrainProcessorVersion\x128.google.cloud.documentai.v1.TrainProcessorVersionRequest\x1A\x1D.google.longrunning.Operation\"\xAF\x01\xCAA>\x0A\x1DTrainProcessorVersionResponse\x12\x1DTrainProcessorVersionMetadata\xDAA\x18parent,processor_version\x82\xD3\xE4\x93\x02M\"H/v1/{parent=projects/*/locations/*/processors/*}/processorVersions:train:\x01*\x12\xCE\x01\x0A\x13GetProcessorVersion\x126.google.cloud.documentai.v1.GetProcessorVersionRequest\x1A,.google.cloud.documentai.v1.ProcessorVersion\"Q\xDAA\x04name\x82\xD3\xE4\x93\x02D\x12B/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}\x12\xE1\x01\x0A\x15ListProcessorVersions\x128.google.cloud.documentai.v1.ListProcessorVersionsRequest\x1A9.google.cloud.documentai.v1.ListProcessorVersionsResponse\"S\xDAA\x06parent\x82\xD3\xE4\x93\x02D\x12B/v1/{parent=projects/*/locations/*/processors/*}/processorVersions\x12\x80\x02\x0A\x16DeleteProcessorVersion\x129.google.cloud.documentai.v1.DeleteProcessorVersionRequest\x1A\x1D.google.longrunning.Operation\"\x8B\x01\xCAA7\x0A\x15google.protobuf.Empty\x12\x1EDeleteProcessorVersionMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02D*B/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}\x12\x93\x02\x0A\x16DeployProcessorVersion\x129.google.cloud.documentai.v1.DeployProcessorVersionRequest\x1A\x1D.google.longrunning.Operation\"\x9E\x01\xCAA@\x0A\x1EDeployProcessorVersionResponse\x12\x1EDeployProcessorVersionMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02N\"I/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}:deploy:\x01*\x12\x9D\x02\x0A\x18UndeployProcessorVersion\x12;.google.cloud.documentai.v1.UndeployProcessorVersionRequest\x1A\x1D.google.longrunning.Operation\"\xA4\x01\xCAAD\x0A UndeployProcessorVersionResponse\x12 UndeployProcessorVersionMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02P\"K/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}:undeploy:\x01*\x12\xC2\x01\x0A\x0FCreateProcessor\x122.google.cloud.documentai.v1.CreateProcessorRequest\x1A%.google.cloud.documentai.v1.Processor\"T\xDAA\x10parent,processor\x82\xD3\xE4\x93\x02;\"./v1/{parent=projects/*/locations/*}/processors:\x09processor\x12\xD6\x01\x0A\x0FDeleteProcessor\x122.google.cloud.documentai.v1.DeleteProcessorRequest\x1A\x1D.google.longrunning.Operation\"p\xCAA0\x0A\x15google.protobuf.Empty\x12\x17DeleteProcessorMetadata\xDAA\x04name\x82\xD3\xE4\x93\x020*./v1/{name=projects/*/locations/*/processors/*}\x12\xDB\x01\x0A\x0FEnableProcessor\x122.google.cloud.documentai.v1.EnableProcessorRequest\x1A\x1D.google.longrunning.Operation\"u\xCAA2\x0A\x17EnableProcessorResponse\x12\x17EnableProcessorMetadata\x82\xD3\xE4\x93\x02:\"5/v1/{name=projects/*/locations/*/processors/*}:enable:\x01*\x12\xE0\x01\x0A\x10DisableProcessor\x123.google.cloud.documentai.v1.DisableProcessorRequest\x1A\x1D.google.longrunning.Operation\"x\xCAA4\x0A\x18DisableProcessorResponse\x12\x18DisableProcessorMetadata\x82\xD3\xE4\x93\x02;\"6/v1/{name=projects/*/locations/*/processors/*}:disable:\x01*\x12\xA1\x02\x0A\x1ASetDefaultProcessorVersion\x12=.google.cloud.documentai.v1.SetDefaultProcessorVersionRequest\x1A\x1D.google.longrunning.Operation\"\xA4\x01\xCAAH\x0A\"SetDefaultProcessorVersionResponse\x12\"SetDefaultProcessorVersionMetadata\x82\xD3\xE4\x93\x02S\"N/v1/{processor=projects/*/locations/*/processors/*}:setDefaultProcessorVersion:\x01*\x12\xA0\x02\x0A\x0EReviewDocument\x121.google.cloud.documentai.v1.ReviewDocumentRequest\x1A\x1D.google.longrunning.Operation\"\xBB\x01\xCAA9\x0A\x16ReviewDocumentResponse\x12\x1FReviewDocumentOperationMetadata\xDAA\x13human_review_config\x82\xD3\xE4\x93\x02c\"^/v1/{human_review_config=projects/*/locations/*/processors/*/humanReviewConfig}:reviewDocument:\x01*\x12\xC7\x02\x0A\x18EvaluateProcessorVersion\x12;.google.cloud.documentai.v1.EvaluateProcessorVersionRequest\x1A\x1D.google.longrunning.Operation\"\xCE\x01\xCAAD\x0A EvaluateProcessorVersionResponse\x12 EvaluateProcessorVersionMetadata\xDAA\x11processor_version\x82\xD3\xE4\x93\x02m\"h/v1/{processor_version=projects/*/locations/*/processors/*/processorVersions/*}:evaluateProcessorVersion:\x01*\x12\xCA\x01\x0A\x0DGetEvaluation\x120.google.cloud.documentai.v1.GetEvaluationRequest\x1A&.google.cloud.documentai.v1.Evaluation\"_\xDAA\x04name\x82\xD3\xE4\x93\x02R\x12P/v1/{name=projects/*/locations/*/processors/*/processorVersions/*/evaluations/*}\x12\xDD\x01\x0A\x0FListEvaluations\x122.google.cloud.documentai.v1.ListEvaluationsRequest\x1A3.google.cloud.documentai.v1.ListEvaluationsResponse\"a\xDAA\x06parent\x82\xD3\xE4\x93\x02R\x12P/v1/{parent=projects/*/locations/*/processors/*/processorVersions/*}/evaluations\x1AM\xCAA\x19documentai.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xAA\x03\x0A\x1Ecom.google.cloud.documentai.v1B\x1ADocumentAiProcessorServiceP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xAA\x02\x1AGoogle.Cloud.DocumentAI.V1\xCA\x02\x1AGoogle\\Cloud\\DocumentAI\\V1\xEA\x02\x1DGoogle::Cloud::DocumentAI::V1\xEAA\x7F\x0A+documentai.googleapis.com/HumanReviewConfig\x12Pprojects/{project}/locations/{location}/processors/{processor}/humanReviewConfig\xEAAM\x0A\"documentai.googleapis.com/Location\x12'projects/{project}/locations/{location}b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/DocumentSchema.php b/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/DocumentSchema.php new file mode 100644 index 000000000000..43e2817c9f4b --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/DocumentSchema.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\x81\x0B\x0A0google/cloud/documentai/v1/document_schema.proto\x12\x1Agoogle.cloud.documentai.v1\"\xCF\x08\x0A\x0EDocumentSchema\x12\x14\x0A\x0Cdisplay_name\x18\x01 \x01(\x09\x12\x13\x0A\x0Bdescription\x18\x02 \x01(\x09\x12K\x0A\x0Centity_types\x18\x03 \x03(\x0B25.google.cloud.documentai.v1.DocumentSchema.EntityType\x12E\x0A\x08metadata\x18\x04 \x01(\x0B23.google.cloud.documentai.v1.DocumentSchema.Metadata\x1A\xE6\x05\x0A\x0AEntityType\x12W\x0A\x0Benum_values\x18\x0E \x01(\x0B2@.google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValuesH\x00\x12\x14\x0A\x0Cdisplay_name\x18\x0D \x01(\x09\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x12\x0A\x0Abase_types\x18\x02 \x03(\x09\x12R\x0A\x0Aproperties\x18\x06 \x03(\x0B2>.google.cloud.documentai.v1.DocumentSchema.EntityType.Property\x1A\x1C\x0A\x0AEnumValues\x12\x0E\x0A\x06values\x18\x01 \x03(\x09\x1A\xC4\x03\x0A\x08Property\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x06 \x01(\x09\x12\x12\x0A\x0Avalue_type\x18\x02 \x01(\x09\x12f\x0A\x0Foccurrence_type\x18\x03 \x01(\x0E2M.google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType\x12U\x0A\x06method\x18\x08 \x01(\x0E2E.google.cloud.documentai.v1.DocumentSchema.EntityType.Property.Method\"\x85\x01\x0A\x0EOccurrenceType\x12\x1F\x0A\x1BOCCURRENCE_TYPE_UNSPECIFIED\x10\x00\x12\x11\x0A\x0DOPTIONAL_ONCE\x10\x01\x12\x15\x0A\x11OPTIONAL_MULTIPLE\x10\x02\x12\x11\x0A\x0DREQUIRED_ONCE\x10\x03\x12\x15\x0A\x11REQUIRED_MULTIPLE\x10\x04\"9\x0A\x06Method\x12\x16\x0A\x12METHOD_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07EXTRACT\x10\x01\x12\x0A\x0A\x06DERIVE\x10\x02B\x0E\x0A\x0Cvalue_source\x1A\x94\x01\x0A\x08Metadata\x12\x19\x0A\x11document_splitter\x18\x01 \x01(\x08\x12&\x0A\x1Edocument_allow_multiple_labels\x18\x02 \x01(\x08\x12%\x0A\x1Dprefixed_naming_on_properties\x18\x06 \x01(\x08\x12\x1E\x0A\x16skip_naming_validation\x18\x07 \x01(\x08B\xD6\x01\x0A\x1Ecom.google.cloud.documentai.v1B\x18DocumentAiDocumentSchemaP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xAA\x02\x1AGoogle.Cloud.DocumentAI.V1\xCA\x02\x1AGoogle\\Cloud\\DocumentAI\\V1\xEA\x02\x1DGoogle::Cloud::DocumentAI::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Evaluation.php b/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Evaluation.php new file mode 100644 index 000000000000..792d9db5809b --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Evaluation.php @@ -0,0 +1,27 @@ +internalAddGeneratedFile( + "\x0A\xD0\x12\x0A+google/cloud/documentai/v1/evaluation.proto\x12\x1Agoogle.cloud.documentai.v1\x1A\x19google/api/resource.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x83\x02\x0A\x13EvaluationReference\x12\x11\x0A\x09operation\x18\x01 \x01(\x09\x12=\x0A\x0Aevaluation\x18\x02 \x01(\x09B)\xFAA&\x0A\$documentai.googleapis.com/Evaluation\x12I\x0A\x11aggregate_metrics\x18\x04 \x01(\x0B2..google.cloud.documentai.v1.Evaluation.Metrics\x12O\x0A\x17aggregate_metrics_exact\x18\x05 \x01(\x0B2..google.cloud.documentai.v1.Evaluation.Metrics\"\xE5\x0D\x0A\x0AEvaluation\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12/\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12J\x0A\x11document_counters\x18\x05 \x01(\x0B2/.google.cloud.documentai.v1.Evaluation.Counters\x12[\x0A\x14all_entities_metrics\x18\x03 \x01(\x0B2=.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics\x12Q\x0A\x0Eentity_metrics\x18\x04 \x03(\x0B29.google.cloud.documentai.v1.Evaluation.EntityMetricsEntry\x12\x14\x0A\x0Ckms_key_name\x18\x06 \x01(\x09\x12\x1C\x0A\x14kms_key_version_name\x18\x07 \x01(\x09\x1A\x8D\x01\x0A\x08Counters\x12\x1D\x0A\x15input_documents_count\x18\x01 \x01(\x05\x12\x1F\x0A\x17invalid_documents_count\x18\x02 \x01(\x05\x12\x1E\x0A\x16failed_documents_count\x18\x03 \x01(\x05\x12!\x0A\x19evaluated_documents_count\x18\x04 \x01(\x05\x1A\xCD\x02\x0A\x07Metrics\x12\x11\x0A\x09precision\x18\x01 \x01(\x02\x12\x0E\x0A\x06recall\x18\x02 \x01(\x02\x12\x10\x0A\x08f1_score\x18\x03 \x01(\x02\x12#\x0A\x1Bpredicted_occurrences_count\x18\x04 \x01(\x05\x12&\x0A\x1Eground_truth_occurrences_count\x18\x05 \x01(\x05\x12 \x0A\x18predicted_document_count\x18\x0A \x01(\x05\x12#\x0A\x1Bground_truth_document_count\x18\x0B \x01(\x05\x12\x1C\x0A\x14true_positives_count\x18\x06 \x01(\x05\x12\x1D\x0A\x15false_positives_count\x18\x07 \x01(\x05\x12\x1D\x0A\x15false_negatives_count\x18\x08 \x01(\x05\x12\x1D\x0A\x15total_documents_count\x18\x09 \x01(\x05\x1As\x0A\x16ConfidenceLevelMetrics\x12\x18\x0A\x10confidence_level\x18\x01 \x01(\x02\x12?\x0A\x07metrics\x18\x02 \x01(\x0B2..google.cloud.documentai.v1.Evaluation.Metrics\x1A\xF1\x03\x0A\x16MultiConfidenceMetrics\x12_\x0A\x18confidence_level_metrics\x18\x01 \x03(\x0B2=.google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics\x12e\x0A\x1Econfidence_level_metrics_exact\x18\x04 \x03(\x0B2=.google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics\x12\x0D\x0A\x05auprc\x18\x02 \x01(\x02\x12#\x0A\x1Bestimated_calibration_error\x18\x03 \x01(\x02\x12\x13\x0A\x0Bauprc_exact\x18\x05 \x01(\x02\x12)\x0A!estimated_calibration_error_exact\x18\x06 \x01(\x02\x12_\x0A\x0Cmetrics_type\x18\x07 \x01(\x0E2I.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.MetricsType\":\x0A\x0BMetricsType\x12\x1C\x0A\x18METRICS_TYPE_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09AGGREGATE\x10\x01\x1As\x0A\x12EntityMetricsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12L\x0A\x05value\x18\x02 \x01(\x0B2=.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics:\x028\x01:\xA9\x01\xEAA\xA5\x01\x0A\$documentai.googleapis.com/Evaluation\x12}projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}B\xD2\x01\x0A\x1Ecom.google.cloud.documentai.v1B\x14DocumentAiEvaluationP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xAA\x02\x1AGoogle.Cloud.DocumentAI.V1\xCA\x02\x1AGoogle\\Cloud\\DocumentAI\\V1\xEA\x02\x1DGoogle::Cloud::DocumentAI::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Geometry.php b/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Geometry.php new file mode 100644 index 000000000000..faf0e564072a --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Geometry.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\xF9\x03\x0A)google/cloud/documentai/v1/geometry.proto\x12\x1Agoogle.cloud.documentai.v1\"\x1E\x0A\x06Vertex\x12\x09\x0A\x01x\x18\x01 \x01(\x05\x12\x09\x0A\x01y\x18\x02 \x01(\x05\"(\x0A\x10NormalizedVertex\x12\x09\x0A\x01x\x18\x01 \x01(\x02\x12\x09\x0A\x01y\x18\x02 \x01(\x02\"\x8F\x01\x0A\x0CBoundingPoly\x124\x0A\x08vertices\x18\x01 \x03(\x0B2\".google.cloud.documentai.v1.Vertex\x12I\x0A\x13normalized_vertices\x18\x02 \x03(\x0B2,.google.cloud.documentai.v1.NormalizedVertexB\xCB\x01\x0A\x1Ecom.google.cloud.documentai.v1B\x0DGeometryProtoP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xAA\x02\x1AGoogle.Cloud.DocumentAI.V1\xCA\x02\x1AGoogle\\Cloud\\DocumentAI\\V1\xEA\x02\x1DGoogle::Cloud::DocumentAI::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/OperationMetadata.php b/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/OperationMetadata.php new file mode 100644 index 000000000000..ee3d45f728bb --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/OperationMetadata.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\x88\x05\x0A3google/cloud/documentai/v1/operation_metadata.proto\x12\x1Agoogle.cloud.documentai.v1\"\xD5\x02\x0A\x17CommonOperationMetadata\x12H\x0A\x05state\x18\x01 \x01(\x0E29.google.cloud.documentai.v1.CommonOperationMetadata.State\x12\x15\x0A\x0Dstate_message\x18\x02 \x01(\x09\x12\x10\x0A\x08resource\x18\x05 \x01(\x09\x12/\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12/\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\"e\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07RUNNING\x10\x01\x12\x0E\x0A\x0ACANCELLING\x10\x02\x12\x0D\x0A\x09SUCCEEDED\x10\x03\x12\x0A\x0A\x06FAILED\x10\x04\x12\x0D\x0A\x09CANCELLED\x10\x05B\xD4\x01\x0A\x1Ecom.google.cloud.documentai.v1B\x16OperationMetadataProtoP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xAA\x02\x1AGoogle.Cloud.DocumentAI.V1\xCA\x02\x1AGoogle\\Cloud\\DocumentAI\\V1\xEA\x02\x1DGoogle::Cloud::DocumentAI::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Processor.php b/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Processor.php new file mode 100644 index 000000000000..3eac7d7ace95 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Processor.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\xA7\x19\x0A*google/cloud/documentai/v1/processor.proto\x12\x1Agoogle.cloud.documentai.v1\x1A\x19google/api/resource.proto\x1A0google/cloud/documentai/v1/document_schema.proto\x1A+google/cloud/documentai/v1/evaluation.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xA9\x0F\x0A\x10ProcessorVersion\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x14\x0A\x0Cdisplay_name\x18\x02 \x01(\x09\x12H\x0A\x0Fdocument_schema\x18\x0C \x01(\x0B2*.google.cloud.documentai.v1.DocumentSchemaB\x03\xE0A\x03\x12F\x0A\x05state\x18\x06 \x01(\x0E22.google.cloud.documentai.v1.ProcessorVersion.StateB\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12O\x0A\x11latest_evaluation\x18\x08 \x01(\x0B2/.google.cloud.documentai.v1.EvaluationReferenceB\x03\xE0A\x03\x12\x19\x0A\x0Ckms_key_name\x18\x09 \x01(\x09B\x03\xE0A\x03\x12!\x0A\x14kms_key_version_name\x18\x0A \x01(\x09B\x03\xE0A\x03\x12\x1B\x0A\x0Egoogle_managed\x18\x0B \x01(\x08B\x03\xE0A\x03\x12[\x0A\x10deprecation_info\x18\x0D \x01(\x0B2<.google.cloud.documentai.v1.ProcessorVersion.DeprecationInfoB\x03\xE0A\x03\x12O\x0A\x0Amodel_type\x18\x0F \x01(\x0E26.google.cloud.documentai.v1.ProcessorVersion.ModelTypeB\x03\xE0A\x03\x12\x1A\x0A\x0Dsatisfies_pzs\x18\x10 \x01(\x08B\x03\xE0A\x03\x12\x1A\x0A\x0Dsatisfies_pzi\x18\x11 \x01(\x08B\x03\xE0A\x03\x12[\x0A\x11gen_ai_model_info\x18\x12 \x01(\x0B2;.google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfoB\x03\xE0A\x03\x1A\x9F\x01\x0A\x0FDeprecationInfo\x124\x0A\x10deprecation_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12V\x0A\x1Dreplacement_processor_version\x18\x02 \x01(\x09B/\xFAA,\x0A*documentai.googleapis.com/ProcessorVersion\x1A\x88\x05\x0A\x0EGenAiModelInfo\x12|\x0A\x1Cfoundation_gen_ai_model_info\x18\x01 \x01(\x0B2T.google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.FoundationGenAiModelInfoH\x00\x12t\x0A\x18custom_gen_ai_model_info\x18\x02 \x01(\x0B2P.google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.CustomGenAiModelInfoH\x00\x1A[\x0A\x18FoundationGenAiModelInfo\x12\x1A\x0A\x12finetuning_allowed\x18\x01 \x01(\x08\x12#\x0A\x1Bmin_train_labeled_documents\x18\x02 \x01(\x05\x1A\x96\x02\x0A\x14CustomGenAiModelInfo\x12{\x0A\x11custom_model_type\x18\x01 \x01(\x0E2`.google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.CustomGenAiModelInfo.CustomModelType\x12!\x0A\x19base_processor_version_id\x18\x02 \x01(\x09\"^\x0A\x0FCustomModelType\x12!\x0A\x1DCUSTOM_MODEL_TYPE_UNSPECIFIED\x10\x00\x12\x18\x0A\x14VERSIONED_FOUNDATION\x10\x01\x12\x0E\x0A\x0AFINE_TUNED\x10\x02B\x0C\x0A\x0Amodel_info\"\x93\x01\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08DEPLOYED\x10\x01\x12\x0D\x0A\x09DEPLOYING\x10\x02\x12\x0E\x0A\x0AUNDEPLOYED\x10\x03\x12\x0F\x0A\x0BUNDEPLOYING\x10\x04\x12\x0C\x0A\x08CREATING\x10\x05\x12\x0C\x0A\x08DELETING\x10\x06\x12\x0A\x0A\x06FAILED\x10\x07\x12\x0D\x0A\x09IMPORTING\x10\x08\"Y\x0A\x09ModelType\x12\x1A\x0A\x16MODEL_TYPE_UNSPECIFIED\x10\x00\x12\x19\x0A\x15MODEL_TYPE_GENERATIVE\x10\x01\x12\x15\x0A\x11MODEL_TYPE_CUSTOM\x10\x02:\x96\x01\xEAA\x92\x01\x0A*documentai.googleapis.com/ProcessorVersion\x12dprojects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}\"r\x0A\x15ProcessorVersionAlias\x12\x0D\x0A\x05alias\x18\x01 \x01(\x09\x12J\x0A\x11processor_version\x18\x02 \x01(\x09B/\xFAA,\x0A*documentai.googleapis.com/ProcessorVersion\"\xC5\x05\x0A\x09Processor\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x05\xE0A\x03\x12\x0C\x0A\x04type\x18\x02 \x01(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x03 \x01(\x09\x12?\x0A\x05state\x18\x04 \x01(\x0E2+.google.cloud.documentai.v1.Processor.StateB\x03\xE0A\x03\x12R\x0A\x19default_processor_version\x18\x09 \x01(\x09B/\xFAA,\x0A*documentai.googleapis.com/ProcessorVersion\x12Y\x0A\x19processor_version_aliases\x18\x0A \x03(\x0B21.google.cloud.documentai.v1.ProcessorVersionAliasB\x03\xE0A\x03\x12 \x0A\x10process_endpoint\x18\x06 \x01(\x09B\x06\xE0A\x03\xE0A\x05\x124\x0A\x0Bcreate_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x14\x0A\x0Ckms_key_name\x18\x08 \x01(\x09\x12\x1A\x0A\x0Dsatisfies_pzs\x18\x0C \x01(\x08B\x03\xE0A\x03\x12\x1A\x0A\x0Dsatisfies_pzi\x18\x0D \x01(\x08B\x03\xE0A\x03\"~\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07ENABLED\x10\x01\x12\x0C\x0A\x08DISABLED\x10\x02\x12\x0C\x0A\x08ENABLING\x10\x03\x12\x0D\x0A\x09DISABLING\x10\x04\x12\x0C\x0A\x08CREATING\x10\x05\x12\x0A\x0A\x06FAILED\x10\x06\x12\x0C\x0A\x08DELETING\x10\x07:h\xEAAe\x0A#documentai.googleapis.com/Processor\x12>projects/{project}/locations/{location}/processors/{processor}B\xD1\x01\x0A\x1Ecom.google.cloud.documentai.v1B\x13DocumentAiProcessorP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xAA\x02\x1AGoogle.Cloud.DocumentAI.V1\xCA\x02\x1AGoogle\\Cloud\\DocumentAI\\V1\xEA\x02\x1DGoogle::Cloud::DocumentAI::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/ProcessorType.php b/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/ProcessorType.php new file mode 100644 index 000000000000..af8cfd769331 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/ProcessorType.php @@ -0,0 +1,26 @@ +internalAddGeneratedFile( + "\x0A\xDE\x05\x0A/google/cloud/documentai/v1/processor_type.proto\x12\x1Agoogle.cloud.documentai.v1\x1A\x19google/api/resource.proto\"\x93\x03\x0A\x0DProcessorType\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x0C\x0A\x04type\x18\x02 \x01(\x09\x12\x10\x0A\x08category\x18\x03 \x01(\x09\x12S\x0A\x13available_locations\x18\x04 \x03(\x0B26.google.cloud.documentai.v1.ProcessorType.LocationInfo\x12\x16\x0A\x0Eallow_creation\x18\x06 \x01(\x08\x12-\x0A\x0Claunch_stage\x18\x08 \x01(\x0E2\x17.google.api.LaunchStage\x12\x1C\x0A\x14sample_document_uris\x18\x09 \x03(\x09\x1A#\x0A\x0CLocationInfo\x12\x13\x0A\x0Blocation_id\x18\x01 \x01(\x09:u\xEAAr\x0A'documentai.googleapis.com/ProcessorType\x12Gprojects/{project}/locations/{location}/processorTypes/{processor_type}B\xD5\x01\x0A\x1Ecom.google.cloud.documentai.v1B\x17DocumentAiProcessorTypeP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xAA\x02\x1AGoogle.Cloud.DocumentAI.V1\xCA\x02\x1AGoogle\\Cloud\\DocumentAI\\V1\xEA\x02\x1DGoogle::Cloud::DocumentAI::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Barcode.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Barcode.php new file mode 100644 index 000000000000..32bd1b42fe8b --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Barcode.php @@ -0,0 +1,255 @@ +google.cloud.documentai.v1.Barcode + */ +class Barcode extends \Google\Protobuf\Internal\Message +{ + /** + * Format of a barcode. + * The supported formats are: + * - `CODE_128`: Code 128 type. + * - `CODE_39`: Code 39 type. + * - `CODE_93`: Code 93 type. + * - `CODABAR`: Codabar type. + * - `DATA_MATRIX`: 2D Data Matrix type. + * - `ITF`: ITF type. + * - `EAN_13`: EAN-13 type. + * - `EAN_8`: EAN-8 type. + * - `QR_CODE`: 2D QR code type. + * - `UPC_A`: UPC-A type. + * - `UPC_E`: UPC-E type. + * - `PDF417`: PDF417 type. + * - `AZTEC`: 2D Aztec code type. + * - `DATABAR`: GS1 DataBar code type. + * + * Generated from protobuf field string format = 1; + */ + protected $format = ''; + /** + * Value format describes the format of the value that a barcode + * encodes. + * The supported formats are: + * - `CONTACT_INFO`: Contact information. + * - `EMAIL`: Email address. + * - `ISBN`: ISBN identifier. + * - `PHONE`: Phone number. + * - `PRODUCT`: Product. + * - `SMS`: SMS message. + * - `TEXT`: Text string. + * - `URL`: URL address. + * - `WIFI`: Wifi information. + * - `GEO`: Geo-localization. + * - `CALENDAR_EVENT`: Calendar event. + * - `DRIVER_LICENSE`: Driver's license. + * + * Generated from protobuf field string value_format = 2; + */ + protected $value_format = ''; + /** + * Raw value encoded in the barcode. + * For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`. + * + * Generated from protobuf field string raw_value = 3; + */ + protected $raw_value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $format + * Format of a barcode. + * The supported formats are: + * - `CODE_128`: Code 128 type. + * - `CODE_39`: Code 39 type. + * - `CODE_93`: Code 93 type. + * - `CODABAR`: Codabar type. + * - `DATA_MATRIX`: 2D Data Matrix type. + * - `ITF`: ITF type. + * - `EAN_13`: EAN-13 type. + * - `EAN_8`: EAN-8 type. + * - `QR_CODE`: 2D QR code type. + * - `UPC_A`: UPC-A type. + * - `UPC_E`: UPC-E type. + * - `PDF417`: PDF417 type. + * - `AZTEC`: 2D Aztec code type. + * - `DATABAR`: GS1 DataBar code type. + * @type string $value_format + * Value format describes the format of the value that a barcode + * encodes. + * The supported formats are: + * - `CONTACT_INFO`: Contact information. + * - `EMAIL`: Email address. + * - `ISBN`: ISBN identifier. + * - `PHONE`: Phone number. + * - `PRODUCT`: Product. + * - `SMS`: SMS message. + * - `TEXT`: Text string. + * - `URL`: URL address. + * - `WIFI`: Wifi information. + * - `GEO`: Geo-localization. + * - `CALENDAR_EVENT`: Calendar event. + * - `DRIVER_LICENSE`: Driver's license. + * @type string $raw_value + * Raw value encoded in the barcode. + * For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Barcode::initOnce(); + parent::__construct($data); + } + + /** + * Format of a barcode. + * The supported formats are: + * - `CODE_128`: Code 128 type. + * - `CODE_39`: Code 39 type. + * - `CODE_93`: Code 93 type. + * - `CODABAR`: Codabar type. + * - `DATA_MATRIX`: 2D Data Matrix type. + * - `ITF`: ITF type. + * - `EAN_13`: EAN-13 type. + * - `EAN_8`: EAN-8 type. + * - `QR_CODE`: 2D QR code type. + * - `UPC_A`: UPC-A type. + * - `UPC_E`: UPC-E type. + * - `PDF417`: PDF417 type. + * - `AZTEC`: 2D Aztec code type. + * - `DATABAR`: GS1 DataBar code type. + * + * Generated from protobuf field string format = 1; + * @return string + */ + public function getFormat() + { + return $this->format; + } + + /** + * Format of a barcode. + * The supported formats are: + * - `CODE_128`: Code 128 type. + * - `CODE_39`: Code 39 type. + * - `CODE_93`: Code 93 type. + * - `CODABAR`: Codabar type. + * - `DATA_MATRIX`: 2D Data Matrix type. + * - `ITF`: ITF type. + * - `EAN_13`: EAN-13 type. + * - `EAN_8`: EAN-8 type. + * - `QR_CODE`: 2D QR code type. + * - `UPC_A`: UPC-A type. + * - `UPC_E`: UPC-E type. + * - `PDF417`: PDF417 type. + * - `AZTEC`: 2D Aztec code type. + * - `DATABAR`: GS1 DataBar code type. + * + * Generated from protobuf field string format = 1; + * @param string $var + * @return $this + */ + public function setFormat($var) + { + GPBUtil::checkString($var, True); + $this->format = $var; + + return $this; + } + + /** + * Value format describes the format of the value that a barcode + * encodes. + * The supported formats are: + * - `CONTACT_INFO`: Contact information. + * - `EMAIL`: Email address. + * - `ISBN`: ISBN identifier. + * - `PHONE`: Phone number. + * - `PRODUCT`: Product. + * - `SMS`: SMS message. + * - `TEXT`: Text string. + * - `URL`: URL address. + * - `WIFI`: Wifi information. + * - `GEO`: Geo-localization. + * - `CALENDAR_EVENT`: Calendar event. + * - `DRIVER_LICENSE`: Driver's license. + * + * Generated from protobuf field string value_format = 2; + * @return string + */ + public function getValueFormat() + { + return $this->value_format; + } + + /** + * Value format describes the format of the value that a barcode + * encodes. + * The supported formats are: + * - `CONTACT_INFO`: Contact information. + * - `EMAIL`: Email address. + * - `ISBN`: ISBN identifier. + * - `PHONE`: Phone number. + * - `PRODUCT`: Product. + * - `SMS`: SMS message. + * - `TEXT`: Text string. + * - `URL`: URL address. + * - `WIFI`: Wifi information. + * - `GEO`: Geo-localization. + * - `CALENDAR_EVENT`: Calendar event. + * - `DRIVER_LICENSE`: Driver's license. + * + * Generated from protobuf field string value_format = 2; + * @param string $var + * @return $this + */ + public function setValueFormat($var) + { + GPBUtil::checkString($var, True); + $this->value_format = $var; + + return $this; + } + + /** + * Raw value encoded in the barcode. + * For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`. + * + * Generated from protobuf field string raw_value = 3; + * @return string + */ + public function getRawValue() + { + return $this->raw_value; + } + + /** + * Raw value encoded in the barcode. + * For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`. + * + * Generated from protobuf field string raw_value = 3; + * @param string $var + * @return $this + */ + public function setRawValue($var) + { + GPBUtil::checkString($var, True); + $this->raw_value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchDocumentsInputConfig.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchDocumentsInputConfig.php new file mode 100644 index 000000000000..99740463f11c --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchDocumentsInputConfig.php @@ -0,0 +1,108 @@ +google.cloud.documentai.v1.BatchDocumentsInputConfig + */ +class BatchDocumentsInputConfig extends \Google\Protobuf\Internal\Message +{ + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\GcsPrefix $gcs_prefix + * The set of documents that match the specified Cloud Storage `gcs_prefix`. + * @type \Google\Cloud\DocumentAI\V1\GcsDocuments $gcs_documents + * The set of documents individually specified on Cloud Storage. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentIo::initOnce(); + parent::__construct($data); + } + + /** + * The set of documents that match the specified Cloud Storage `gcs_prefix`. + * + * Generated from protobuf field .google.cloud.documentai.v1.GcsPrefix gcs_prefix = 1; + * @return \Google\Cloud\DocumentAI\V1\GcsPrefix|null + */ + public function getGcsPrefix() + { + return $this->readOneof(1); + } + + public function hasGcsPrefix() + { + return $this->hasOneof(1); + } + + /** + * The set of documents that match the specified Cloud Storage `gcs_prefix`. + * + * Generated from protobuf field .google.cloud.documentai.v1.GcsPrefix gcs_prefix = 1; + * @param \Google\Cloud\DocumentAI\V1\GcsPrefix $var + * @return $this + */ + public function setGcsPrefix($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\GcsPrefix::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The set of documents individually specified on Cloud Storage. + * + * Generated from protobuf field .google.cloud.documentai.v1.GcsDocuments gcs_documents = 2; + * @return \Google\Cloud\DocumentAI\V1\GcsDocuments|null + */ + public function getGcsDocuments() + { + return $this->readOneof(2); + } + + public function hasGcsDocuments() + { + return $this->hasOneof(2); + } + + /** + * The set of documents individually specified on Cloud Storage. + * + * Generated from protobuf field .google.cloud.documentai.v1.GcsDocuments gcs_documents = 2; + * @param \Google\Cloud\DocumentAI\V1\GcsDocuments $var + * @return $this + */ + public function setGcsDocuments($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\GcsDocuments::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessMetadata.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessMetadata.php new file mode 100644 index 000000000000..46b4ab45c885 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessMetadata.php @@ -0,0 +1,228 @@ +google.cloud.documentai.v1.BatchProcessMetadata + */ +class BatchProcessMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The state of the current batch processing. + * + * Generated from protobuf field .google.cloud.documentai.v1.BatchProcessMetadata.State state = 1; + */ + protected $state = 0; + /** + * A message providing more details about the current state of processing. + * For example, the error message if the operation is failed. + * + * Generated from protobuf field string state_message = 2; + */ + protected $state_message = ''; + /** + * The creation time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + */ + protected $create_time = null; + /** + * The last update time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + */ + protected $update_time = null; + /** + * The list of response details of each document. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5; + */ + private $individual_process_statuses; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * The state of the current batch processing. + * @type string $state_message + * A message providing more details about the current state of processing. + * For example, the error message if the operation is failed. + * @type \Google\Protobuf\Timestamp $create_time + * The creation time of the operation. + * @type \Google\Protobuf\Timestamp $update_time + * The last update time of the operation. + * @type \Google\Cloud\DocumentAI\V1\BatchProcessMetadata\IndividualProcessStatus[] $individual_process_statuses + * The list of response details of each document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * The state of the current batch processing. + * + * Generated from protobuf field .google.cloud.documentai.v1.BatchProcessMetadata.State state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of the current batch processing. + * + * Generated from protobuf field .google.cloud.documentai.v1.BatchProcessMetadata.State state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\BatchProcessMetadata\State::class); + $this->state = $var; + + return $this; + } + + /** + * A message providing more details about the current state of processing. + * For example, the error message if the operation is failed. + * + * Generated from protobuf field string state_message = 2; + * @return string + */ + public function getStateMessage() + { + return $this->state_message; + } + + /** + * A message providing more details about the current state of processing. + * For example, the error message if the operation is failed. + * + * Generated from protobuf field string state_message = 2; + * @param string $var + * @return $this + */ + public function setStateMessage($var) + { + GPBUtil::checkString($var, True); + $this->state_message = $var; + + return $this; + } + + /** + * The creation time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * The creation time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * The last update time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * The last update time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * The list of response details of each document. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\BatchProcessMetadata\IndividualProcessStatus> + */ + public function getIndividualProcessStatuses() + { + return $this->individual_process_statuses; + } + + /** + * The list of response details of each document. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5; + * @param \Google\Cloud\DocumentAI\V1\BatchProcessMetadata\IndividualProcessStatus[] $var + * @return $this + */ + public function setIndividualProcessStatuses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\BatchProcessMetadata\IndividualProcessStatus::class); + $this->individual_process_statuses = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessMetadata/IndividualProcessStatus.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessMetadata/IndividualProcessStatus.php new file mode 100644 index 000000000000..31740cc3a034 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessMetadata/IndividualProcessStatus.php @@ -0,0 +1,205 @@ +google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus + */ +class IndividualProcessStatus extends \Google\Protobuf\Internal\Message +{ + /** + * The source of the document, same as the + * [input_gcs_source][google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus.input_gcs_source] + * field in the request when the batch process started. + * + * Generated from protobuf field string input_gcs_source = 1; + */ + protected $input_gcs_source = ''; + /** + * The status processing the document. + * + * Generated from protobuf field .google.rpc.Status status = 2; + */ + protected $status = null; + /** + * The Cloud Storage output destination (in the request as + * [DocumentOutputConfig.GcsOutputConfig.gcs_uri][google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.gcs_uri]) + * of the processed document if it was successful, otherwise empty. + * + * Generated from protobuf field string output_gcs_destination = 3; + */ + protected $output_gcs_destination = ''; + /** + * The status of human review on the processed document. + * + * Generated from protobuf field .google.cloud.documentai.v1.HumanReviewStatus human_review_status = 5; + */ + protected $human_review_status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $input_gcs_source + * The source of the document, same as the + * [input_gcs_source][google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus.input_gcs_source] + * field in the request when the batch process started. + * @type \Google\Rpc\Status $status + * The status processing the document. + * @type string $output_gcs_destination + * The Cloud Storage output destination (in the request as + * [DocumentOutputConfig.GcsOutputConfig.gcs_uri][google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.gcs_uri]) + * of the processed document if it was successful, otherwise empty. + * @type \Google\Cloud\DocumentAI\V1\HumanReviewStatus $human_review_status + * The status of human review on the processed document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * The source of the document, same as the + * [input_gcs_source][google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus.input_gcs_source] + * field in the request when the batch process started. + * + * Generated from protobuf field string input_gcs_source = 1; + * @return string + */ + public function getInputGcsSource() + { + return $this->input_gcs_source; + } + + /** + * The source of the document, same as the + * [input_gcs_source][google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus.input_gcs_source] + * field in the request when the batch process started. + * + * Generated from protobuf field string input_gcs_source = 1; + * @param string $var + * @return $this + */ + public function setInputGcsSource($var) + { + GPBUtil::checkString($var, True); + $this->input_gcs_source = $var; + + return $this; + } + + /** + * The status processing the document. + * + * Generated from protobuf field .google.rpc.Status status = 2; + * @return \Google\Rpc\Status|null + */ + public function getStatus() + { + return $this->status; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * The status processing the document. + * + * Generated from protobuf field .google.rpc.Status status = 2; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->status = $var; + + return $this; + } + + /** + * The Cloud Storage output destination (in the request as + * [DocumentOutputConfig.GcsOutputConfig.gcs_uri][google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.gcs_uri]) + * of the processed document if it was successful, otherwise empty. + * + * Generated from protobuf field string output_gcs_destination = 3; + * @return string + */ + public function getOutputGcsDestination() + { + return $this->output_gcs_destination; + } + + /** + * The Cloud Storage output destination (in the request as + * [DocumentOutputConfig.GcsOutputConfig.gcs_uri][google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.gcs_uri]) + * of the processed document if it was successful, otherwise empty. + * + * Generated from protobuf field string output_gcs_destination = 3; + * @param string $var + * @return $this + */ + public function setOutputGcsDestination($var) + { + GPBUtil::checkString($var, True); + $this->output_gcs_destination = $var; + + return $this; + } + + /** + * The status of human review on the processed document. + * + * Generated from protobuf field .google.cloud.documentai.v1.HumanReviewStatus human_review_status = 5; + * @return \Google\Cloud\DocumentAI\V1\HumanReviewStatus|null + */ + public function getHumanReviewStatus() + { + return $this->human_review_status; + } + + public function hasHumanReviewStatus() + { + return isset($this->human_review_status); + } + + public function clearHumanReviewStatus() + { + unset($this->human_review_status); + } + + /** + * The status of human review on the processed document. + * + * Generated from protobuf field .google.cloud.documentai.v1.HumanReviewStatus human_review_status = 5; + * @param \Google\Cloud\DocumentAI\V1\HumanReviewStatus $var + * @return $this + */ + public function setHumanReviewStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\HumanReviewStatus::class); + $this->human_review_status = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessMetadata/State.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessMetadata/State.php new file mode 100644 index 000000000000..25dbecc25b0f --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessMetadata/State.php @@ -0,0 +1,89 @@ +google.cloud.documentai.v1.BatchProcessMetadata.State + */ +class State +{ + /** + * The default value. This value is used if the state is omitted. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Request operation is waiting for scheduling. + * + * Generated from protobuf enum WAITING = 1; + */ + const WAITING = 1; + /** + * Request is being processed. + * + * Generated from protobuf enum RUNNING = 2; + */ + const RUNNING = 2; + /** + * The batch processing completed successfully. + * + * Generated from protobuf enum SUCCEEDED = 3; + */ + const SUCCEEDED = 3; + /** + * The batch processing was being cancelled. + * + * Generated from protobuf enum CANCELLING = 4; + */ + const CANCELLING = 4; + /** + * The batch processing was cancelled. + * + * Generated from protobuf enum CANCELLED = 5; + */ + const CANCELLED = 5; + /** + * The batch processing has failed. + * + * Generated from protobuf enum FAILED = 6; + */ + const FAILED = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::WAITING => 'WAITING', + self::RUNNING => 'RUNNING', + self::SUCCEEDED => 'SUCCEEDED', + self::CANCELLING => 'CANCELLING', + self::CANCELLED => 'CANCELLED', + self::FAILED => 'FAILED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessRequest.php new file mode 100644 index 000000000000..f42af43fff8e --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessRequest.php @@ -0,0 +1,342 @@ +google.cloud.documentai.v1.BatchProcessRequest + */ +class BatchProcessRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of + * [Processor][google.cloud.documentai.v1.Processor] or + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. + * Format: `projects/{project}/locations/{location}/processors/{processor}`, + * or + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The input documents for the + * [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments] + * method. + * + * Generated from protobuf field .google.cloud.documentai.v1.BatchDocumentsInputConfig input_documents = 5; + */ + protected $input_documents = null; + /** + * The output configuration for the + * [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments] + * method. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentOutputConfig document_output_config = 6; + */ + protected $document_output_config = null; + /** + * Whether human review should be skipped for this request. Default to + * `false`. + * + * Generated from protobuf field bool skip_human_review = 4; + */ + protected $skip_human_review = false; + /** + * Inference-time options for the process API + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessOptions process_options = 7; + */ + protected $process_options = null; + /** + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints) and can only contain lowercase letters, numeric + * characters, underscores, and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * + * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + + /** + * @param string $name Required. The resource name of + * [Processor][google.cloud.documentai.v1.Processor] or + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. + * Format: `projects/{project}/locations/{location}/processors/{processor}`, + * or + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + * + * @return \Google\Cloud\DocumentAI\V1\BatchProcessRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of + * [Processor][google.cloud.documentai.v1.Processor] or + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. + * Format: `projects/{project}/locations/{location}/processors/{processor}`, + * or + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + * @type \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig $input_documents + * The input documents for the + * [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments] + * method. + * @type \Google\Cloud\DocumentAI\V1\DocumentOutputConfig $document_output_config + * The output configuration for the + * [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments] + * method. + * @type bool $skip_human_review + * Whether human review should be skipped for this request. Default to + * `false`. + * @type \Google\Cloud\DocumentAI\V1\ProcessOptions $process_options + * Inference-time options for the process API + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints) and can only contain lowercase letters, numeric + * characters, underscores, and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of + * [Processor][google.cloud.documentai.v1.Processor] or + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. + * Format: `projects/{project}/locations/{location}/processors/{processor}`, + * or + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of + * [Processor][google.cloud.documentai.v1.Processor] or + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. + * Format: `projects/{project}/locations/{location}/processors/{processor}`, + * or + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The input documents for the + * [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments] + * method. + * + * Generated from protobuf field .google.cloud.documentai.v1.BatchDocumentsInputConfig input_documents = 5; + * @return \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig|null + */ + public function getInputDocuments() + { + return $this->input_documents; + } + + public function hasInputDocuments() + { + return isset($this->input_documents); + } + + public function clearInputDocuments() + { + unset($this->input_documents); + } + + /** + * The input documents for the + * [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments] + * method. + * + * Generated from protobuf field .google.cloud.documentai.v1.BatchDocumentsInputConfig input_documents = 5; + * @param \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig $var + * @return $this + */ + public function setInputDocuments($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig::class); + $this->input_documents = $var; + + return $this; + } + + /** + * The output configuration for the + * [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments] + * method. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentOutputConfig document_output_config = 6; + * @return \Google\Cloud\DocumentAI\V1\DocumentOutputConfig|null + */ + public function getDocumentOutputConfig() + { + return $this->document_output_config; + } + + public function hasDocumentOutputConfig() + { + return isset($this->document_output_config); + } + + public function clearDocumentOutputConfig() + { + unset($this->document_output_config); + } + + /** + * The output configuration for the + * [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments] + * method. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentOutputConfig document_output_config = 6; + * @param \Google\Cloud\DocumentAI\V1\DocumentOutputConfig $var + * @return $this + */ + public function setDocumentOutputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\DocumentOutputConfig::class); + $this->document_output_config = $var; + + return $this; + } + + /** + * Whether human review should be skipped for this request. Default to + * `false`. + * + * Generated from protobuf field bool skip_human_review = 4; + * @return bool + */ + public function getSkipHumanReview() + { + return $this->skip_human_review; + } + + /** + * Whether human review should be skipped for this request. Default to + * `false`. + * + * Generated from protobuf field bool skip_human_review = 4; + * @param bool $var + * @return $this + */ + public function setSkipHumanReview($var) + { + GPBUtil::checkBool($var); + $this->skip_human_review = $var; + + return $this; + } + + /** + * Inference-time options for the process API + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessOptions process_options = 7; + * @return \Google\Cloud\DocumentAI\V1\ProcessOptions|null + */ + public function getProcessOptions() + { + return $this->process_options; + } + + public function hasProcessOptions() + { + return isset($this->process_options); + } + + public function clearProcessOptions() + { + unset($this->process_options); + } + + /** + * Inference-time options for the process API + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessOptions process_options = 7; + * @param \Google\Cloud\DocumentAI\V1\ProcessOptions $var + * @return $this + */ + public function setProcessOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\ProcessOptions::class); + $this->process_options = $var; + + return $this; + } + + /** + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints) and can only contain lowercase letters, numeric + * characters, underscores, and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * + * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints) and can only contain lowercase letters, numeric + * characters, underscores, and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * + * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessResponse.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessResponse.php new file mode 100644 index 000000000000..6eae1dcbfd12 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessResponse.php @@ -0,0 +1,34 @@ +google.cloud.documentai.v1.BatchProcessResponse + */ +class BatchProcessResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BoundingPoly.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BoundingPoly.php new file mode 100644 index 000000000000..43e08dadc2e6 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BoundingPoly.php @@ -0,0 +1,101 @@ +google.cloud.documentai.v1.BoundingPoly + */ +class BoundingPoly extends \Google\Protobuf\Internal\Message +{ + /** + * The bounding polygon vertices. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Vertex vertices = 1; + */ + private $vertices; + /** + * The bounding polygon normalized vertices. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.NormalizedVertex normalized_vertices = 2; + */ + private $normalized_vertices; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Vertex[] $vertices + * The bounding polygon vertices. + * @type \Google\Cloud\DocumentAI\V1\NormalizedVertex[] $normalized_vertices + * The bounding polygon normalized vertices. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Geometry::initOnce(); + parent::__construct($data); + } + + /** + * The bounding polygon vertices. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Vertex vertices = 1; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Vertex> + */ + public function getVertices() + { + return $this->vertices; + } + + /** + * The bounding polygon vertices. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Vertex vertices = 1; + * @param \Google\Cloud\DocumentAI\V1\Vertex[] $var + * @return $this + */ + public function setVertices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Vertex::class); + $this->vertices = $arr; + + return $this; + } + + /** + * The bounding polygon normalized vertices. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.NormalizedVertex normalized_vertices = 2; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\NormalizedVertex> + */ + public function getNormalizedVertices() + { + return $this->normalized_vertices; + } + + /** + * The bounding polygon normalized vertices. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.NormalizedVertex normalized_vertices = 2; + * @param \Google\Cloud\DocumentAI\V1\NormalizedVertex[] $var + * @return $this + */ + public function setNormalizedVertices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\NormalizedVertex::class); + $this->normalized_vertices = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/CommonOperationMetadata.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/CommonOperationMetadata.php new file mode 100644 index 000000000000..3532199faf3e --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/CommonOperationMetadata.php @@ -0,0 +1,223 @@ +google.cloud.documentai.v1.CommonOperationMetadata + */ +class CommonOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The state of the operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata.State state = 1; + */ + protected $state = 0; + /** + * A message providing more details about the current state of processing. + * + * Generated from protobuf field string state_message = 2; + */ + protected $state_message = ''; + /** + * A related resource to this operation. + * + * Generated from protobuf field string resource = 5; + */ + protected $resource = ''; + /** + * The creation time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + */ + protected $create_time = null; + /** + * The last update time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * The state of the operation. + * @type string $state_message + * A message providing more details about the current state of processing. + * @type string $resource + * A related resource to this operation. + * @type \Google\Protobuf\Timestamp $create_time + * The creation time of the operation. + * @type \Google\Protobuf\Timestamp $update_time + * The last update time of the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\OperationMetadata::initOnce(); + parent::__construct($data); + } + + /** + * The state of the operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata.State state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of the operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata.State state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\CommonOperationMetadata\State::class); + $this->state = $var; + + return $this; + } + + /** + * A message providing more details about the current state of processing. + * + * Generated from protobuf field string state_message = 2; + * @return string + */ + public function getStateMessage() + { + return $this->state_message; + } + + /** + * A message providing more details about the current state of processing. + * + * Generated from protobuf field string state_message = 2; + * @param string $var + * @return $this + */ + public function setStateMessage($var) + { + GPBUtil::checkString($var, True); + $this->state_message = $var; + + return $this; + } + + /** + * A related resource to this operation. + * + * Generated from protobuf field string resource = 5; + * @return string + */ + public function getResource() + { + return $this->resource; + } + + /** + * A related resource to this operation. + * + * Generated from protobuf field string resource = 5; + * @param string $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkString($var, True); + $this->resource = $var; + + return $this; + } + + /** + * The creation time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * The creation time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * The last update time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * The last update time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/CommonOperationMetadata/State.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/CommonOperationMetadata/State.php new file mode 100644 index 000000000000..f51928fba0ef --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/CommonOperationMetadata/State.php @@ -0,0 +1,82 @@ +google.cloud.documentai.v1.CommonOperationMetadata.State + */ +class State +{ + /** + * Unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Operation is still running. + * + * Generated from protobuf enum RUNNING = 1; + */ + const RUNNING = 1; + /** + * Operation is being cancelled. + * + * Generated from protobuf enum CANCELLING = 2; + */ + const CANCELLING = 2; + /** + * Operation succeeded. + * + * Generated from protobuf enum SUCCEEDED = 3; + */ + const SUCCEEDED = 3; + /** + * Operation failed. + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + /** + * Operation is cancelled. + * + * Generated from protobuf enum CANCELLED = 5; + */ + const CANCELLED = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::RUNNING => 'RUNNING', + self::CANCELLING => 'CANCELLING', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + self::CANCELLED => 'CANCELLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/CreateProcessorRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/CreateProcessorRequest.php new file mode 100644 index 000000000000..8c0ee79bcdbd --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/CreateProcessorRequest.php @@ -0,0 +1,161 @@ +google.cloud.documentai.v1.CreateProcessorRequest + */ +class CreateProcessorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent (project and location) under which to create the + * processor. Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The processor to be created, requires + * [Processor.type][google.cloud.documentai.v1.Processor.type] and + * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] + * to be set. Also, the + * [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] + * field must be set if the processor is under CMEK. + * + * Generated from protobuf field .google.cloud.documentai.v1.Processor processor = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $processor = null; + + /** + * @param string $parent Required. The parent (project and location) under which to create the + * processor. Format: `projects/{project}/locations/{location}` + * Please see {@see DocumentProcessorServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\DocumentAI\V1\Processor $processor Required. The processor to be created, requires + * [Processor.type][google.cloud.documentai.v1.Processor.type] and + * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] + * to be set. Also, the + * [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] + * field must be set if the processor is under CMEK. + * + * @return \Google\Cloud\DocumentAI\V1\CreateProcessorRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\DocumentAI\V1\Processor $processor): self + { + return (new self()) + ->setParent($parent) + ->setProcessor($processor); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent (project and location) under which to create the + * processor. Format: `projects/{project}/locations/{location}` + * @type \Google\Cloud\DocumentAI\V1\Processor $processor + * Required. The processor to be created, requires + * [Processor.type][google.cloud.documentai.v1.Processor.type] and + * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] + * to be set. Also, the + * [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] + * field must be set if the processor is under CMEK. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent (project and location) under which to create the + * processor. Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent (project and location) under which to create the + * processor. Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The processor to be created, requires + * [Processor.type][google.cloud.documentai.v1.Processor.type] and + * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] + * to be set. Also, the + * [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] + * field must be set if the processor is under CMEK. + * + * Generated from protobuf field .google.cloud.documentai.v1.Processor processor = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DocumentAI\V1\Processor|null + */ + public function getProcessor() + { + return $this->processor; + } + + public function hasProcessor() + { + return isset($this->processor); + } + + public function clearProcessor() + { + unset($this->processor); + } + + /** + * Required. The processor to be created, requires + * [Processor.type][google.cloud.documentai.v1.Processor.type] and + * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] + * to be set. Also, the + * [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] + * field must be set if the processor is under CMEK. + * + * Generated from protobuf field .google.cloud.documentai.v1.Processor processor = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DocumentAI\V1\Processor $var + * @return $this + */ + public function setProcessor($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Processor::class); + $this->processor = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorMetadata.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorMetadata.php new file mode 100644 index 000000000000..ecdd42263b56 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorMetadata.php @@ -0,0 +1,79 @@ +google.cloud.documentai.v1.DeleteProcessorMetadata + */ +class DeleteProcessorMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The basic metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 5; + */ + protected $common_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $common_metadata + * The basic metadata of the long-running operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * The basic metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 5; + * @return \Google\Cloud\DocumentAI\V1\CommonOperationMetadata|null + */ + public function getCommonMetadata() + { + return $this->common_metadata; + } + + public function hasCommonMetadata() + { + return isset($this->common_metadata); + } + + public function clearCommonMetadata() + { + unset($this->common_metadata); + } + + /** + * The basic metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 5; + * @param \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $var + * @return $this + */ + public function setCommonMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\CommonOperationMetadata::class); + $this->common_metadata = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorRequest.php new file mode 100644 index 000000000000..023d2ffadf01 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorRequest.php @@ -0,0 +1,83 @@ +google.cloud.documentai.v1.DeleteProcessorRequest + */ +class DeleteProcessorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The processor resource name to be deleted. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The processor resource name to be deleted. Please see + * {@see DocumentProcessorServiceClient::processorName()} for help formatting this field. + * + * @return \Google\Cloud\DocumentAI\V1\DeleteProcessorRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The processor resource name to be deleted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The processor resource name to be deleted. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The processor resource name to be deleted. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorVersionMetadata.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorVersionMetadata.php new file mode 100644 index 000000000000..cca5f350d243 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorVersionMetadata.php @@ -0,0 +1,79 @@ +google.cloud.documentai.v1.DeleteProcessorVersionMetadata + */ +class DeleteProcessorVersionMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The basic metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; + */ + protected $common_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $common_metadata + * The basic metadata of the long-running operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * The basic metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; + * @return \Google\Cloud\DocumentAI\V1\CommonOperationMetadata|null + */ + public function getCommonMetadata() + { + return $this->common_metadata; + } + + public function hasCommonMetadata() + { + return isset($this->common_metadata); + } + + public function clearCommonMetadata() + { + unset($this->common_metadata); + } + + /** + * The basic metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; + * @param \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $var + * @return $this + */ + public function setCommonMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\CommonOperationMetadata::class); + $this->common_metadata = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorVersionRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorVersionRequest.php new file mode 100644 index 000000000000..a917757074e4 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorVersionRequest.php @@ -0,0 +1,83 @@ +google.cloud.documentai.v1.DeleteProcessorVersionRequest + */ +class DeleteProcessorVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The processor version resource name to be deleted. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The processor version resource name to be deleted. Please see + * {@see DocumentProcessorServiceClient::processorVersionName()} for help formatting this field. + * + * @return \Google\Cloud\DocumentAI\V1\DeleteProcessorVersionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The processor version resource name to be deleted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The processor version resource name to be deleted. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The processor version resource name to be deleted. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeployProcessorVersionMetadata.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeployProcessorVersionMetadata.php new file mode 100644 index 000000000000..9bb57185bf2f --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeployProcessorVersionMetadata.php @@ -0,0 +1,79 @@ +google.cloud.documentai.v1.DeployProcessorVersionMetadata + */ +class DeployProcessorVersionMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The basic metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; + */ + protected $common_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $common_metadata + * The basic metadata of the long-running operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * The basic metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; + * @return \Google\Cloud\DocumentAI\V1\CommonOperationMetadata|null + */ + public function getCommonMetadata() + { + return $this->common_metadata; + } + + public function hasCommonMetadata() + { + return isset($this->common_metadata); + } + + public function clearCommonMetadata() + { + unset($this->common_metadata); + } + + /** + * The basic metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; + * @param \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $var + * @return $this + */ + public function setCommonMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\CommonOperationMetadata::class); + $this->common_metadata = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeployProcessorVersionRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeployProcessorVersionRequest.php new file mode 100644 index 000000000000..7cbc465dbc41 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeployProcessorVersionRequest.php @@ -0,0 +1,83 @@ +google.cloud.documentai.v1.DeployProcessorVersionRequest + */ +class DeployProcessorVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The processor version resource name to be deployed. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The processor version resource name to be deployed. Please see + * {@see DocumentProcessorServiceClient::processorVersionName()} for help formatting this field. + * + * @return \Google\Cloud\DocumentAI\V1\DeployProcessorVersionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The processor version resource name to be deployed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The processor version resource name to be deployed. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The processor version resource name to be deployed. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeployProcessorVersionResponse.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeployProcessorVersionResponse.php new file mode 100644 index 000000000000..4f0a4bb098e2 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeployProcessorVersionResponse.php @@ -0,0 +1,35 @@ +google.cloud.documentai.v1.DeployProcessorVersionResponse + */ +class DeployProcessorVersionResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DisableProcessorMetadata.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DisableProcessorMetadata.php new file mode 100644 index 000000000000..fc73e56c1637 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DisableProcessorMetadata.php @@ -0,0 +1,79 @@ +google.cloud.documentai.v1.DisableProcessorMetadata + */ +class DisableProcessorMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The basic metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 5; + */ + protected $common_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $common_metadata + * The basic metadata of the long-running operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * The basic metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 5; + * @return \Google\Cloud\DocumentAI\V1\CommonOperationMetadata|null + */ + public function getCommonMetadata() + { + return $this->common_metadata; + } + + public function hasCommonMetadata() + { + return isset($this->common_metadata); + } + + public function clearCommonMetadata() + { + unset($this->common_metadata); + } + + /** + * The basic metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 5; + * @param \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $var + * @return $this + */ + public function setCommonMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\CommonOperationMetadata::class); + $this->common_metadata = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DisableProcessorRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DisableProcessorRequest.php new file mode 100644 index 000000000000..5d01aa323d1b --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DisableProcessorRequest.php @@ -0,0 +1,69 @@ +google.cloud.documentai.v1.DisableProcessorRequest + */ +class DisableProcessorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The processor resource name to be disabled. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The processor resource name to be disabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The processor resource name to be disabled. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The processor resource name to be disabled. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DisableProcessorResponse.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DisableProcessorResponse.php new file mode 100644 index 000000000000..278181ba2090 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DisableProcessorResponse.php @@ -0,0 +1,35 @@ +google.cloud.documentai.v1.DisableProcessorResponse + */ +class DisableProcessorResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document.php new file mode 100644 index 000000000000..6f653d93fea5 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document.php @@ -0,0 +1,835 @@ +google.cloud.documentai.v1.Document + */ +class Document extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. An internal identifier for document. Should be loggable (no PII). + * + * Generated from protobuf field string docid = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $docid = ''; + /** + * An IANA published [media type (MIME + * type)](https://www.iana.org/assignments/media-types/media-types.xhtml). + * + * Generated from protobuf field string mime_type = 3; + */ + protected $mime_type = ''; + /** + * Optional. UTF-8 encoded text in reading order from the document. + * + * Generated from protobuf field string text = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $text = ''; + /** + * Styles for the [Document.text][google.cloud.documentai.v1.Document.text]. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Style text_styles = 5 [deprecated = true]; + * @deprecated + */ + private $text_styles; + /** + * Visual page layout for the [Document][google.cloud.documentai.v1.Document]. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page pages = 6; + */ + private $pages; + /** + * A list of entities detected on + * [Document.text][google.cloud.documentai.v1.Document.text]. For document + * shards, entities in this list may cross shard boundaries. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity entities = 7; + */ + private $entities; + /** + * Placeholder. Relationship among + * [Document.entities][google.cloud.documentai.v1.Document.entities]. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.EntityRelation entity_relations = 8; + */ + private $entity_relations; + /** + * Placeholder. A list of text corrections made to + * [Document.text][google.cloud.documentai.v1.Document.text]. This is usually + * used for annotating corrections to OCR mistakes. Text changes for a given + * revision may not overlap with each other. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.TextChange text_changes = 14; + */ + private $text_changes; + /** + * Information about the sharding if this document is sharded part of a larger + * document. If the document is not sharded, this message is not specified. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.ShardInfo shard_info = 9; + */ + protected $shard_info = null; + /** + * Any error that occurred while processing this document. + * + * Generated from protobuf field .google.rpc.Status error = 10; + */ + protected $error = null; + /** + * Placeholder. Revision history of this document. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Revision revisions = 13; + */ + private $revisions; + /** + * Parsed layout of the document. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.DocumentLayout document_layout = 17; + */ + protected $document_layout = null; + /** + * Document chunked based on chunking config. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.ChunkedDocument chunked_document = 18; + */ + protected $chunked_document = null; + /** + * Optional. The blob assets in this document. This is used to store the + * content of the inline blobs in this document, for example, image bytes, + * such that it can be referenced by other fields in the document via asset + * id. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $blob_assets; + /** + * The entity validation output for the document. This is the validation + * output for `document.entities` field. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.EntityValidationOutput entity_validation_output = 21; + */ + protected $entity_validation_output = null; + /** + * A list of entity revisions. The entity revisions are appended to the + * document in the processing order. This field can be used for comparing the + * entity extraction results at different stages of the processing. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.EntitiesRevision entities_revisions = 22; + */ + private $entities_revisions; + /** + * The entity revision ID that `document.entities` field is based on. + * If this field is set and `entities_revisions` is not empty, the entities in + * `document.entities` field are the entities in the entity revision with this + * id and `document.entity_validation_output` field is the + * `entity_validation_output` field in this entity revision. + * + * Generated from protobuf field string entities_revision_id = 23; + */ + protected $entities_revision_id = ''; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Optional. Currently supports Google Cloud Storage URI of the form + * `gs://bucket_name/object_name`. Object versioning is not supported. + * For more information, refer to [Google Cloud Storage Request + * URIs](https://cloud.google.com/storage/docs/reference-uris). + * @type string $content + * Optional. Inline document content, represented as a stream of bytes. + * Note: As with all `bytes` fields, protobuffers use a pure binary + * representation, whereas JSON representations use base64. + * @type string $docid + * Optional. An internal identifier for document. Should be loggable (no PII). + * @type string $mime_type + * An IANA published [media type (MIME + * type)](https://www.iana.org/assignments/media-types/media-types.xhtml). + * @type string $text + * Optional. UTF-8 encoded text in reading order from the document. + * @type \Google\Cloud\DocumentAI\V1\Document\Style[] $text_styles + * Styles for the [Document.text][google.cloud.documentai.v1.Document.text]. + * @type \Google\Cloud\DocumentAI\V1\Document\Page[] $pages + * Visual page layout for the [Document][google.cloud.documentai.v1.Document]. + * @type \Google\Cloud\DocumentAI\V1\Document\Entity[] $entities + * A list of entities detected on + * [Document.text][google.cloud.documentai.v1.Document.text]. For document + * shards, entities in this list may cross shard boundaries. + * @type \Google\Cloud\DocumentAI\V1\Document\EntityRelation[] $entity_relations + * Placeholder. Relationship among + * [Document.entities][google.cloud.documentai.v1.Document.entities]. + * @type \Google\Cloud\DocumentAI\V1\Document\TextChange[] $text_changes + * Placeholder. A list of text corrections made to + * [Document.text][google.cloud.documentai.v1.Document.text]. This is usually + * used for annotating corrections to OCR mistakes. Text changes for a given + * revision may not overlap with each other. + * @type \Google\Cloud\DocumentAI\V1\Document\ShardInfo $shard_info + * Information about the sharding if this document is sharded part of a larger + * document. If the document is not sharded, this message is not specified. + * @type \Google\Rpc\Status $error + * Any error that occurred while processing this document. + * @type \Google\Cloud\DocumentAI\V1\Document\Revision[] $revisions + * Placeholder. Revision history of this document. + * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout $document_layout + * Parsed layout of the document. + * @type \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument $chunked_document + * Document chunked based on chunking config. + * @type \Google\Cloud\DocumentAI\V1\Document\BlobAsset[] $blob_assets + * Optional. The blob assets in this document. This is used to store the + * content of the inline blobs in this document, for example, image bytes, + * such that it can be referenced by other fields in the document via asset + * id. + * @type \Google\Cloud\DocumentAI\V1\Document\EntityValidationOutput $entity_validation_output + * The entity validation output for the document. This is the validation + * output for `document.entities` field. + * @type \Google\Cloud\DocumentAI\V1\Document\EntitiesRevision[] $entities_revisions + * A list of entity revisions. The entity revisions are appended to the + * document in the processing order. This field can be used for comparing the + * entity extraction results at different stages of the processing. + * @type string $entities_revision_id + * The entity revision ID that `document.entities` field is based on. + * If this field is set and `entities_revisions` is not empty, the entities in + * `document.entities` field are the entities in the entity revision with this + * id and `document.entity_validation_output` field is the + * `entity_validation_output` field in this entity revision. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Currently supports Google Cloud Storage URI of the form + * `gs://bucket_name/object_name`. Object versioning is not supported. + * For more information, refer to [Google Cloud Storage Request + * URIs](https://cloud.google.com/storage/docs/reference-uris). + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getUri() + { + return $this->readOneof(1); + } + + public function hasUri() + { + return $this->hasOneof(1); + } + + /** + * Optional. Currently supports Google Cloud Storage URI of the form + * `gs://bucket_name/object_name`. Object versioning is not supported. + * For more information, refer to [Google Cloud Storage Request + * URIs](https://cloud.google.com/storage/docs/reference-uris). + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Optional. Inline document content, represented as a stream of bytes. + * Note: As with all `bytes` fields, protobuffers use a pure binary + * representation, whereas JSON representations use base64. + * + * Generated from protobuf field bytes content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getContent() + { + return $this->readOneof(2); + } + + public function hasContent() + { + return $this->hasOneof(2); + } + + /** + * Optional. Inline document content, represented as a stream of bytes. + * Note: As with all `bytes` fields, protobuffers use a pure binary + * representation, whereas JSON representations use base64. + * + * Generated from protobuf field bytes content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Optional. An internal identifier for document. Should be loggable (no PII). + * + * Generated from protobuf field string docid = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDocid() + { + return $this->docid; + } + + /** + * Optional. An internal identifier for document. Should be loggable (no PII). + * + * Generated from protobuf field string docid = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDocid($var) + { + GPBUtil::checkString($var, True); + $this->docid = $var; + + return $this; + } + + /** + * An IANA published [media type (MIME + * type)](https://www.iana.org/assignments/media-types/media-types.xhtml). + * + * Generated from protobuf field string mime_type = 3; + * @return string + */ + public function getMimeType() + { + return $this->mime_type; + } + + /** + * An IANA published [media type (MIME + * type)](https://www.iana.org/assignments/media-types/media-types.xhtml). + * + * Generated from protobuf field string mime_type = 3; + * @param string $var + * @return $this + */ + public function setMimeType($var) + { + GPBUtil::checkString($var, True); + $this->mime_type = $var; + + return $this; + } + + /** + * Optional. UTF-8 encoded text in reading order from the document. + * + * Generated from protobuf field string text = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * Optional. UTF-8 encoded text in reading order from the document. + * + * Generated from protobuf field string text = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + + /** + * Styles for the [Document.text][google.cloud.documentai.v1.Document.text]. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Style text_styles = 5 [deprecated = true]; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Style> + * @deprecated + */ + public function getTextStyles() + { + if ($this->text_styles->count() !== 0) { + @trigger_error('text_styles is deprecated.', E_USER_DEPRECATED); + } + return $this->text_styles; + } + + /** + * Styles for the [Document.text][google.cloud.documentai.v1.Document.text]. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Style text_styles = 5 [deprecated = true]; + * @param \Google\Cloud\DocumentAI\V1\Document\Style[] $var + * @return $this + * @deprecated + */ + public function setTextStyles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Style::class); + if ($arr->count() !== 0) { + @trigger_error('text_styles is deprecated.', E_USER_DEPRECATED); + } + $this->text_styles = $arr; + + return $this; + } + + /** + * Visual page layout for the [Document][google.cloud.documentai.v1.Document]. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page pages = 6; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page> + */ + public function getPages() + { + return $this->pages; + } + + /** + * Visual page layout for the [Document][google.cloud.documentai.v1.Document]. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page pages = 6; + * @param \Google\Cloud\DocumentAI\V1\Document\Page[] $var + * @return $this + */ + public function setPages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page::class); + $this->pages = $arr; + + return $this; + } + + /** + * A list of entities detected on + * [Document.text][google.cloud.documentai.v1.Document.text]. For document + * shards, entities in this list may cross shard boundaries. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity entities = 7; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Entity> + */ + public function getEntities() + { + return $this->entities; + } + + /** + * A list of entities detected on + * [Document.text][google.cloud.documentai.v1.Document.text]. For document + * shards, entities in this list may cross shard boundaries. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity entities = 7; + * @param \Google\Cloud\DocumentAI\V1\Document\Entity[] $var + * @return $this + */ + public function setEntities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Entity::class); + $this->entities = $arr; + + return $this; + } + + /** + * Placeholder. Relationship among + * [Document.entities][google.cloud.documentai.v1.Document.entities]. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.EntityRelation entity_relations = 8; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\EntityRelation> + */ + public function getEntityRelations() + { + return $this->entity_relations; + } + + /** + * Placeholder. Relationship among + * [Document.entities][google.cloud.documentai.v1.Document.entities]. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.EntityRelation entity_relations = 8; + * @param \Google\Cloud\DocumentAI\V1\Document\EntityRelation[] $var + * @return $this + */ + public function setEntityRelations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\EntityRelation::class); + $this->entity_relations = $arr; + + return $this; + } + + /** + * Placeholder. A list of text corrections made to + * [Document.text][google.cloud.documentai.v1.Document.text]. This is usually + * used for annotating corrections to OCR mistakes. Text changes for a given + * revision may not overlap with each other. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.TextChange text_changes = 14; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\TextChange> + */ + public function getTextChanges() + { + return $this->text_changes; + } + + /** + * Placeholder. A list of text corrections made to + * [Document.text][google.cloud.documentai.v1.Document.text]. This is usually + * used for annotating corrections to OCR mistakes. Text changes for a given + * revision may not overlap with each other. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.TextChange text_changes = 14; + * @param \Google\Cloud\DocumentAI\V1\Document\TextChange[] $var + * @return $this + */ + public function setTextChanges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\TextChange::class); + $this->text_changes = $arr; + + return $this; + } + + /** + * Information about the sharding if this document is sharded part of a larger + * document. If the document is not sharded, this message is not specified. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.ShardInfo shard_info = 9; + * @return \Google\Cloud\DocumentAI\V1\Document\ShardInfo|null + */ + public function getShardInfo() + { + return $this->shard_info; + } + + public function hasShardInfo() + { + return isset($this->shard_info); + } + + public function clearShardInfo() + { + unset($this->shard_info); + } + + /** + * Information about the sharding if this document is sharded part of a larger + * document. If the document is not sharded, this message is not specified. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.ShardInfo shard_info = 9; + * @param \Google\Cloud\DocumentAI\V1\Document\ShardInfo $var + * @return $this + */ + public function setShardInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\ShardInfo::class); + $this->shard_info = $var; + + return $this; + } + + /** + * Any error that occurred while processing this document. + * + * Generated from protobuf field .google.rpc.Status error = 10; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Any error that occurred while processing this document. + * + * Generated from protobuf field .google.rpc.Status error = 10; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * Placeholder. Revision history of this document. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Revision revisions = 13; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Revision> + */ + public function getRevisions() + { + return $this->revisions; + } + + /** + * Placeholder. Revision history of this document. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Revision revisions = 13; + * @param \Google\Cloud\DocumentAI\V1\Document\Revision[] $var + * @return $this + */ + public function setRevisions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Revision::class); + $this->revisions = $arr; + + return $this; + } + + /** + * Parsed layout of the document. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.DocumentLayout document_layout = 17; + * @return \Google\Cloud\DocumentAI\V1\Document\DocumentLayout|null + */ + public function getDocumentLayout() + { + return $this->document_layout; + } + + public function hasDocumentLayout() + { + return isset($this->document_layout); + } + + public function clearDocumentLayout() + { + unset($this->document_layout); + } + + /** + * Parsed layout of the document. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.DocumentLayout document_layout = 17; + * @param \Google\Cloud\DocumentAI\V1\Document\DocumentLayout $var + * @return $this + */ + public function setDocumentLayout($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\DocumentLayout::class); + $this->document_layout = $var; + + return $this; + } + + /** + * Document chunked based on chunking config. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.ChunkedDocument chunked_document = 18; + * @return \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument|null + */ + public function getChunkedDocument() + { + return $this->chunked_document; + } + + public function hasChunkedDocument() + { + return isset($this->chunked_document); + } + + public function clearChunkedDocument() + { + unset($this->chunked_document); + } + + /** + * Document chunked based on chunking config. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.ChunkedDocument chunked_document = 18; + * @param \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument $var + * @return $this + */ + public function setChunkedDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument::class); + $this->chunked_document = $var; + + return $this; + } + + /** + * Optional. The blob assets in this document. This is used to store the + * content of the inline blobs in this document, for example, image bytes, + * such that it can be referenced by other fields in the document via asset + * id. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\BlobAsset> + */ + public function getBlobAssets() + { + return $this->blob_assets; + } + + /** + * Optional. The blob assets in this document. This is used to store the + * content of the inline blobs in this document, for example, image bytes, + * such that it can be referenced by other fields in the document via asset + * id. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\DocumentAI\V1\Document\BlobAsset[] $var + * @return $this + */ + public function setBlobAssets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\BlobAsset::class); + $this->blob_assets = $arr; + + return $this; + } + + /** + * The entity validation output for the document. This is the validation + * output for `document.entities` field. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.EntityValidationOutput entity_validation_output = 21; + * @return \Google\Cloud\DocumentAI\V1\Document\EntityValidationOutput|null + */ + public function getEntityValidationOutput() + { + return $this->entity_validation_output; + } + + public function hasEntityValidationOutput() + { + return isset($this->entity_validation_output); + } + + public function clearEntityValidationOutput() + { + unset($this->entity_validation_output); + } + + /** + * The entity validation output for the document. This is the validation + * output for `document.entities` field. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.EntityValidationOutput entity_validation_output = 21; + * @param \Google\Cloud\DocumentAI\V1\Document\EntityValidationOutput $var + * @return $this + */ + public function setEntityValidationOutput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\EntityValidationOutput::class); + $this->entity_validation_output = $var; + + return $this; + } + + /** + * A list of entity revisions. The entity revisions are appended to the + * document in the processing order. This field can be used for comparing the + * entity extraction results at different stages of the processing. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.EntitiesRevision entities_revisions = 22; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\EntitiesRevision> + */ + public function getEntitiesRevisions() + { + return $this->entities_revisions; + } + + /** + * A list of entity revisions. The entity revisions are appended to the + * document in the processing order. This field can be used for comparing the + * entity extraction results at different stages of the processing. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.EntitiesRevision entities_revisions = 22; + * @param \Google\Cloud\DocumentAI\V1\Document\EntitiesRevision[] $var + * @return $this + */ + public function setEntitiesRevisions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\EntitiesRevision::class); + $this->entities_revisions = $arr; + + return $this; + } + + /** + * The entity revision ID that `document.entities` field is based on. + * If this field is set and `entities_revisions` is not empty, the entities in + * `document.entities` field are the entities in the entity revision with this + * id and `document.entity_validation_output` field is the + * `entity_validation_output` field in this entity revision. + * + * Generated from protobuf field string entities_revision_id = 23; + * @return string + */ + public function getEntitiesRevisionId() + { + return $this->entities_revision_id; + } + + /** + * The entity revision ID that `document.entities` field is based on. + * If this field is set and `entities_revisions` is not empty, the entities in + * `document.entities` field are the entities in the entity revision with this + * id and `document.entity_validation_output` field is the + * `entity_validation_output` field in this entity revision. + * + * Generated from protobuf field string entities_revision_id = 23; + * @param string $var + * @return $this + */ + public function setEntitiesRevisionId($var) + { + GPBUtil::checkString($var, True); + $this->entities_revision_id = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Annotations.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Annotations.php new file mode 100644 index 000000000000..4a0e271e55fd --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Annotations.php @@ -0,0 +1,67 @@ +google.cloud.documentai.v1.Document.Annotations + */ +class Annotations extends \Google\Protobuf\Internal\Message +{ + /** + * The description of the content with this annotation. + * + * Generated from protobuf field string description = 1; + */ + protected $description = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $description + * The description of the content with this annotation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * The description of the content with this annotation. + * + * Generated from protobuf field string description = 1; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description of the content with this annotation. + * + * Generated from protobuf field string description = 1; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/BlobAsset.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/BlobAsset.php new file mode 100644 index 000000000000..98f4830fddd5 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/BlobAsset.php @@ -0,0 +1,145 @@ +google.cloud.documentai.v1.Document.BlobAsset + */ +class BlobAsset extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The id of the blob asset. + * + * Generated from protobuf field string asset_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $asset_id = ''; + /** + * Optional. The content of the blob asset, for example, image bytes. + * + * Generated from protobuf field bytes content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $content = ''; + /** + * The mime type of the blob asset. + * An IANA published [media type (MIME + * type)](https://www.iana.org/assignments/media-types/media-types.xhtml). + * + * Generated from protobuf field string mime_type = 3; + */ + protected $mime_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $asset_id + * Optional. The id of the blob asset. + * @type string $content + * Optional. The content of the blob asset, for example, image bytes. + * @type string $mime_type + * The mime type of the blob asset. + * An IANA published [media type (MIME + * type)](https://www.iana.org/assignments/media-types/media-types.xhtml). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The id of the blob asset. + * + * Generated from protobuf field string asset_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAssetId() + { + return $this->asset_id; + } + + /** + * Optional. The id of the blob asset. + * + * Generated from protobuf field string asset_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAssetId($var) + { + GPBUtil::checkString($var, True); + $this->asset_id = $var; + + return $this; + } + + /** + * Optional. The content of the blob asset, for example, image bytes. + * + * Generated from protobuf field bytes content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Optional. The content of the blob asset, for example, image bytes. + * + * Generated from protobuf field bytes content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, False); + $this->content = $var; + + return $this; + } + + /** + * The mime type of the blob asset. + * An IANA published [media type (MIME + * type)](https://www.iana.org/assignments/media-types/media-types.xhtml). + * + * Generated from protobuf field string mime_type = 3; + * @return string + */ + public function getMimeType() + { + return $this->mime_type; + } + + /** + * The mime type of the blob asset. + * An IANA published [media type (MIME + * type)](https://www.iana.org/assignments/media-types/media-types.xhtml). + * + * Generated from protobuf field string mime_type = 3; + * @param string $var + * @return $this + */ + public function setMimeType($var) + { + GPBUtil::checkString($var, True); + $this->mime_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument.php new file mode 100644 index 000000000000..ba3142b07029 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument.php @@ -0,0 +1,67 @@ +google.cloud.documentai.v1.Document.ChunkedDocument + */ +class ChunkedDocument extends \Google\Protobuf\Internal\Message +{ + /** + * List of chunks. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + */ + private $chunks; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk[] $chunks + * List of chunks. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * List of chunks. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk> + */ + public function getChunks() + { + return $this->chunks; + } + + /** + * List of chunks. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + * @param \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk[] $var + * @return $this + */ + public function setChunks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk::class); + $this->chunks = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk.php new file mode 100644 index 000000000000..5823a992d478 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk.php @@ -0,0 +1,281 @@ +google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + */ +class Chunk extends \Google\Protobuf\Internal\Message +{ + /** + * ID of the chunk. + * + * Generated from protobuf field string chunk_id = 1; + */ + protected $chunk_id = ''; + /** + * Unused. + * + * Generated from protobuf field repeated string source_block_ids = 2; + */ + private $source_block_ids; + /** + * Text content of the chunk. + * + * Generated from protobuf field string content = 3; + */ + protected $content = ''; + /** + * Page span of the chunk. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + */ + protected $page_span = null; + /** + * Page headers associated with the chunk. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + */ + private $page_headers; + /** + * Page footers associated with the chunk. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; + */ + private $page_footers; + /** + * Chunk fields inside this chunk. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; + */ + private $chunk_fields; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $chunk_id + * ID of the chunk. + * @type string[] $source_block_ids + * Unused. + * @type string $content + * Text content of the chunk. + * @type \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageSpan $page_span + * Page span of the chunk. + * @type \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageHeader[] $page_headers + * Page headers associated with the chunk. + * @type \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageFooter[] $page_footers + * Page footers associated with the chunk. + * @type \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkField[] $chunk_fields + * Chunk fields inside this chunk. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * ID of the chunk. + * + * Generated from protobuf field string chunk_id = 1; + * @return string + */ + public function getChunkId() + { + return $this->chunk_id; + } + + /** + * ID of the chunk. + * + * Generated from protobuf field string chunk_id = 1; + * @param string $var + * @return $this + */ + public function setChunkId($var) + { + GPBUtil::checkString($var, True); + $this->chunk_id = $var; + + return $this; + } + + /** + * Unused. + * + * Generated from protobuf field repeated string source_block_ids = 2; + * @return RepeatedField + */ + public function getSourceBlockIds() + { + return $this->source_block_ids; + } + + /** + * Unused. + * + * Generated from protobuf field repeated string source_block_ids = 2; + * @param string[] $var + * @return $this + */ + public function setSourceBlockIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->source_block_ids = $arr; + + return $this; + } + + /** + * Text content of the chunk. + * + * Generated from protobuf field string content = 3; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Text content of the chunk. + * + * Generated from protobuf field string content = 3; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, True); + $this->content = $var; + + return $this; + } + + /** + * Page span of the chunk. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * @return \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageSpan|null + */ + public function getPageSpan() + { + return $this->page_span; + } + + public function hasPageSpan() + { + return isset($this->page_span); + } + + public function clearPageSpan() + { + unset($this->page_span); + } + + /** + * Page span of the chunk. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * @param \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageSpan $var + * @return $this + */ + public function setPageSpan($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageSpan::class); + $this->page_span = $var; + + return $this; + } + + /** + * Page headers associated with the chunk. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageHeader> + */ + public function getPageHeaders() + { + return $this->page_headers; + } + + /** + * Page headers associated with the chunk. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * @param \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageHeader[] $var + * @return $this + */ + public function setPageHeaders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageHeader::class); + $this->page_headers = $arr; + + return $this; + } + + /** + * Page footers associated with the chunk. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageFooter> + */ + public function getPageFooters() + { + return $this->page_footers; + } + + /** + * Page footers associated with the chunk. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; + * @param \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageFooter[] $var + * @return $this + */ + public function setPageFooters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageFooter::class); + $this->page_footers = $arr; + + return $this; + } + + /** + * Chunk fields inside this chunk. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkField> + */ + public function getChunkFields() + { + return $this->chunk_fields; + } + + /** + * Chunk fields inside this chunk. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; + * @param \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkField[] $var + * @return $this + */ + public function setChunkFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkField::class); + $this->chunk_fields = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ChunkField.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ChunkField.php new file mode 100644 index 000000000000..3254de492b65 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ChunkField.php @@ -0,0 +1,109 @@ +google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + */ +class ChunkField extends \Google\Protobuf\Internal\Message +{ + protected $field_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ImageChunkField $image_chunk_field + * The image chunk field in the chunk. + * @type \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\TableChunkField $table_chunk_field + * The table chunk field in the chunk. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * The image chunk field in the chunk. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField image_chunk_field = 1; + * @return \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ImageChunkField|null + */ + public function getImageChunkField() + { + return $this->readOneof(1); + } + + public function hasImageChunkField() + { + return $this->hasOneof(1); + } + + /** + * The image chunk field in the chunk. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField image_chunk_field = 1; + * @param \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ImageChunkField $var + * @return $this + */ + public function setImageChunkField($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ImageChunkField::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The table chunk field in the chunk. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField table_chunk_field = 2; + * @return \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\TableChunkField|null + */ + public function getTableChunkField() + { + return $this->readOneof(2); + } + + public function hasTableChunkField() + { + return $this->hasOneof(2); + } + + /** + * The table chunk field in the chunk. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField table_chunk_field = 2; + * @param \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\TableChunkField $var + * @return $this + */ + public function setTableChunkField($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\TableChunkField::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getFieldType() + { + return $this->whichOneof("field_type"); + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ChunkPageFooter.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ChunkPageFooter.php new file mode 100644 index 000000000000..789640d2ea4a --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ChunkPageFooter.php @@ -0,0 +1,111 @@ +google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + */ +class ChunkPageFooter extends \Google\Protobuf\Internal\Message +{ + /** + * Footer in text format. + * + * Generated from protobuf field string text = 1; + */ + protected $text = ''; + /** + * Page span of the footer. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + */ + protected $page_span = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * Footer in text format. + * @type \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageSpan $page_span + * Page span of the footer. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Footer in text format. + * + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * Footer in text format. + * + * Generated from protobuf field string text = 1; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + + /** + * Page span of the footer. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * @return \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageSpan|null + */ + public function getPageSpan() + { + return $this->page_span; + } + + public function hasPageSpan() + { + return isset($this->page_span); + } + + public function clearPageSpan() + { + unset($this->page_span); + } + + /** + * Page span of the footer. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * @param \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageSpan $var + * @return $this + */ + public function setPageSpan($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageSpan::class); + $this->page_span = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ChunkPageHeader.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ChunkPageHeader.php new file mode 100644 index 000000000000..867bbec7fa58 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ChunkPageHeader.php @@ -0,0 +1,111 @@ +google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + */ +class ChunkPageHeader extends \Google\Protobuf\Internal\Message +{ + /** + * Header in text format. + * + * Generated from protobuf field string text = 1; + */ + protected $text = ''; + /** + * Page span of the header. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + */ + protected $page_span = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * Header in text format. + * @type \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageSpan $page_span + * Page span of the header. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Header in text format. + * + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * Header in text format. + * + * Generated from protobuf field string text = 1; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + + /** + * Page span of the header. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * @return \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageSpan|null + */ + public function getPageSpan() + { + return $this->page_span; + } + + public function hasPageSpan() + { + return isset($this->page_span); + } + + public function clearPageSpan() + { + unset($this->page_span); + } + + /** + * Page span of the header. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * @param \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageSpan $var + * @return $this + */ + public function setPageSpan($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageSpan::class); + $this->page_span = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ChunkPageSpan.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ChunkPageSpan.php new file mode 100644 index 000000000000..97e30124c284 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ChunkPageSpan.php @@ -0,0 +1,101 @@ +google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + */ +class ChunkPageSpan extends \Google\Protobuf\Internal\Message +{ + /** + * Page where chunk starts in the document. + * + * Generated from protobuf field int32 page_start = 1; + */ + protected $page_start = 0; + /** + * Page where chunk ends in the document. + * + * Generated from protobuf field int32 page_end = 2; + */ + protected $page_end = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $page_start + * Page where chunk starts in the document. + * @type int $page_end + * Page where chunk ends in the document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Page where chunk starts in the document. + * + * Generated from protobuf field int32 page_start = 1; + * @return int + */ + public function getPageStart() + { + return $this->page_start; + } + + /** + * Page where chunk starts in the document. + * + * Generated from protobuf field int32 page_start = 1; + * @param int $var + * @return $this + */ + public function setPageStart($var) + { + GPBUtil::checkInt32($var); + $this->page_start = $var; + + return $this; + } + + /** + * Page where chunk ends in the document. + * + * Generated from protobuf field int32 page_end = 2; + * @return int + */ + public function getPageEnd() + { + return $this->page_end; + } + + /** + * Page where chunk ends in the document. + * + * Generated from protobuf field int32 page_end = 2; + * @param int $var + * @return $this + */ + public function setPageEnd($var) + { + GPBUtil::checkInt32($var); + $this->page_end = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ImageChunkField.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ImageChunkField.php new file mode 100644 index 000000000000..e65d3abb0bc5 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ImageChunkField.php @@ -0,0 +1,200 @@ +google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + */ +class ImageChunkField extends \Google\Protobuf\Internal\Message +{ + /** + * Annotation of the image chunk field. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + protected $annotations = null; + protected $image_source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $blob_asset_id + * Optional. Asset id of the inline image. If set, find the image + * content in the blob_assets field. + * @type string $gcs_uri + * Optional. Google Cloud Storage uri of the image. + * @type string $data_uri + * Optional. Data uri of the image. + * It is composed of four parts: a prefix (data:), a MIME type + * indicating the type of data, an optional base64 token if + * non-textual, and the data itself: + * data:[][;base64], + * @type \Google\Cloud\DocumentAI\V1\Document\Annotations $annotations + * Annotation of the image chunk field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Asset id of the inline image. If set, find the image + * content in the blob_assets field. + * + * Generated from protobuf field string blob_asset_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getBlobAssetId() + { + return $this->readOneof(1); + } + + public function hasBlobAssetId() + { + return $this->hasOneof(1); + } + + /** + * Optional. Asset id of the inline image. If set, find the image + * content in the blob_assets field. + * + * Generated from protobuf field string blob_asset_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setBlobAssetId($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Optional. Google Cloud Storage uri of the image. + * + * Generated from protobuf field string gcs_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getGcsUri() + { + return $this->readOneof(2); + } + + public function hasGcsUri() + { + return $this->hasOneof(2); + } + + /** + * Optional. Google Cloud Storage uri of the image. + * + * Generated from protobuf field string gcs_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setGcsUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Optional. Data uri of the image. + * It is composed of four parts: a prefix (data:), a MIME type + * indicating the type of data, an optional base64 token if + * non-textual, and the data itself: + * data:[][;base64], + * + * Generated from protobuf field string data_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDataUri() + { + return $this->readOneof(3); + } + + public function hasDataUri() + { + return $this->hasOneof(3); + } + + /** + * Optional. Data uri of the image. + * It is composed of four parts: a prefix (data:), a MIME type + * indicating the type of data, an optional base64 token if + * non-textual, and the data itself: + * data:[][;base64], + * + * Generated from protobuf field string data_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDataUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Annotation of the image chunk field. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Annotations annotations = 4; + * @return \Google\Cloud\DocumentAI\V1\Document\Annotations|null + */ + public function getAnnotations() + { + return $this->annotations; + } + + public function hasAnnotations() + { + return isset($this->annotations); + } + + public function clearAnnotations() + { + unset($this->annotations); + } + + /** + * Annotation of the image chunk field. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Annotations annotations = 4; + * @param \Google\Cloud\DocumentAI\V1\Document\Annotations $var + * @return $this + */ + public function setAnnotations($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Annotations::class); + $this->annotations = $var; + + return $this; + } + + /** + * @return string + */ + public function getImageSource() + { + return $this->whichOneof("image_source"); + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/TableChunkField.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/TableChunkField.php new file mode 100644 index 000000000000..b76e42189ecd --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/TableChunkField.php @@ -0,0 +1,77 @@ +google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + */ +class TableChunkField extends \Google\Protobuf\Internal\Message +{ + /** + * Annotation of the table chunk field. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Annotations annotations = 1; + */ + protected $annotations = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document\Annotations $annotations + * Annotation of the table chunk field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Annotation of the table chunk field. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Annotations annotations = 1; + * @return \Google\Cloud\DocumentAI\V1\Document\Annotations|null + */ + public function getAnnotations() + { + return $this->annotations; + } + + public function hasAnnotations() + { + return isset($this->annotations); + } + + public function clearAnnotations() + { + unset($this->annotations); + } + + /** + * Annotation of the table chunk field. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Annotations annotations = 1; + * @param \Google\Cloud\DocumentAI\V1\Document\Annotations $var + * @return $this + */ + public function setAnnotations($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Annotations::class); + $this->annotations = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout.php new file mode 100644 index 000000000000..9fd0ec72acae --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout.php @@ -0,0 +1,68 @@ +google.cloud.documentai.v1.Document.DocumentLayout + */ +class DocumentLayout extends \Google\Protobuf\Internal\Message +{ + /** + * List of blocks in the document. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + */ + private $blocks; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock[] $blocks + * List of blocks in the document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * List of blocks in the document. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock> + */ + public function getBlocks() + { + return $this->blocks; + } + + /** + * List of blocks in the document. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * @param \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock[] $var + * @return $this + */ + public function setBlocks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock::class); + $this->blocks = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock.php new file mode 100644 index 000000000000..a1a42fb47bc6 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock.php @@ -0,0 +1,297 @@ +google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + */ +class DocumentLayoutBlock extends \Google\Protobuf\Internal\Message +{ + /** + * ID of the block. + * + * Generated from protobuf field string block_id = 1; + */ + protected $block_id = ''; + /** + * Page span of the block. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; + */ + protected $page_span = null; + /** + * Identifies the bounding box for the block. + * + * Generated from protobuf field .google.cloud.documentai.v1.BoundingPoly bounding_box = 6; + */ + protected $bounding_box = null; + protected $block; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTextBlock $text_block + * Block consisting of text content. + * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableBlock $table_block + * Block consisting of table content/structure. + * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutListBlock $list_block + * Block consisting of list content/structure. + * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutImageBlock $image_block + * Block consisting of image content. + * @type string $block_id + * ID of the block. + * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutPageSpan $page_span + * Page span of the block. + * @type \Google\Cloud\DocumentAI\V1\BoundingPoly $bounding_box + * Identifies the bounding box for the block. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Block consisting of text content. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * @return \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTextBlock|null + */ + public function getTextBlock() + { + return $this->readOneof(2); + } + + public function hasTextBlock() + { + return $this->hasOneof(2); + } + + /** + * Block consisting of text content. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * @param \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTextBlock $var + * @return $this + */ + public function setTextBlock($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTextBlock::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Block consisting of table content/structure. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * @return \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableBlock|null + */ + public function getTableBlock() + { + return $this->readOneof(3); + } + + public function hasTableBlock() + { + return $this->hasOneof(3); + } + + /** + * Block consisting of table content/structure. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * @param \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableBlock $var + * @return $this + */ + public function setTableBlock($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableBlock::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Block consisting of list content/structure. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; + * @return \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutListBlock|null + */ + public function getListBlock() + { + return $this->readOneof(4); + } + + public function hasListBlock() + { + return $this->hasOneof(4); + } + + /** + * Block consisting of list content/structure. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; + * @param \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutListBlock $var + * @return $this + */ + public function setListBlock($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutListBlock::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Block consisting of image content. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock image_block = 7; + * @return \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutImageBlock|null + */ + public function getImageBlock() + { + return $this->readOneof(7); + } + + public function hasImageBlock() + { + return $this->hasOneof(7); + } + + /** + * Block consisting of image content. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock image_block = 7; + * @param \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutImageBlock $var + * @return $this + */ + public function setImageBlock($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutImageBlock::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * ID of the block. + * + * Generated from protobuf field string block_id = 1; + * @return string + */ + public function getBlockId() + { + return $this->block_id; + } + + /** + * ID of the block. + * + * Generated from protobuf field string block_id = 1; + * @param string $var + * @return $this + */ + public function setBlockId($var) + { + GPBUtil::checkString($var, True); + $this->block_id = $var; + + return $this; + } + + /** + * Page span of the block. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; + * @return \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutPageSpan|null + */ + public function getPageSpan() + { + return $this->page_span; + } + + public function hasPageSpan() + { + return isset($this->page_span); + } + + public function clearPageSpan() + { + unset($this->page_span); + } + + /** + * Page span of the block. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; + * @param \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutPageSpan $var + * @return $this + */ + public function setPageSpan($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutPageSpan::class); + $this->page_span = $var; + + return $this; + } + + /** + * Identifies the bounding box for the block. + * + * Generated from protobuf field .google.cloud.documentai.v1.BoundingPoly bounding_box = 6; + * @return \Google\Cloud\DocumentAI\V1\BoundingPoly|null + */ + public function getBoundingBox() + { + return $this->bounding_box; + } + + public function hasBoundingBox() + { + return isset($this->bounding_box); + } + + public function clearBoundingBox() + { + unset($this->bounding_box); + } + + /** + * Identifies the bounding box for the block. + * + * Generated from protobuf field .google.cloud.documentai.v1.BoundingPoly bounding_box = 6; + * @param \Google\Cloud\DocumentAI\V1\BoundingPoly $var + * @return $this + */ + public function setBoundingBox($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\BoundingPoly::class); + $this->bounding_box = $var; + + return $this; + } + + /** + * @return string + */ + public function getBlock() + { + return $this->whichOneof("block"); + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutImageBlock.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutImageBlock.php new file mode 100644 index 000000000000..4859308efc00 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutImageBlock.php @@ -0,0 +1,276 @@ +google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock + */ +class LayoutImageBlock extends \Google\Protobuf\Internal\Message +{ + /** + * Mime type of the image. An IANA published [media type (MIME type)] + * (https://www.iana.org/assignments/media-types/media-types.xhtml). + * + * Generated from protobuf field string mime_type = 1; + */ + protected $mime_type = ''; + /** + * Text extracted from the image using OCR or alt text describing the + * image. + * + * Generated from protobuf field string image_text = 2; + */ + protected $image_text = ''; + /** + * Annotation of the image block. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Annotations annotations = 3; + */ + protected $annotations = null; + protected $image_source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $blob_asset_id + * Optional. Asset id of the inline image. If set, find the image + * content in the blob_assets field. + * @type string $gcs_uri + * Optional. Google Cloud Storage uri of the image. + * @type string $data_uri + * Optional. Data uri of the image. + * It is composed of four parts: a prefix (data:), a MIME type + * indicating the type of data, an optional base64 token if + * non-textual, and the data itself: + * data:[][;base64], + * @type string $mime_type + * Mime type of the image. An IANA published [media type (MIME type)] + * (https://www.iana.org/assignments/media-types/media-types.xhtml). + * @type string $image_text + * Text extracted from the image using OCR or alt text describing the + * image. + * @type \Google\Cloud\DocumentAI\V1\Document\Annotations $annotations + * Annotation of the image block. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Asset id of the inline image. If set, find the image + * content in the blob_assets field. + * + * Generated from protobuf field string blob_asset_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getBlobAssetId() + { + return $this->readOneof(4); + } + + public function hasBlobAssetId() + { + return $this->hasOneof(4); + } + + /** + * Optional. Asset id of the inline image. If set, find the image + * content in the blob_assets field. + * + * Generated from protobuf field string blob_asset_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setBlobAssetId($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Optional. Google Cloud Storage uri of the image. + * + * Generated from protobuf field string gcs_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getGcsUri() + { + return $this->readOneof(5); + } + + public function hasGcsUri() + { + return $this->hasOneof(5); + } + + /** + * Optional. Google Cloud Storage uri of the image. + * + * Generated from protobuf field string gcs_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setGcsUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Optional. Data uri of the image. + * It is composed of four parts: a prefix (data:), a MIME type + * indicating the type of data, an optional base64 token if + * non-textual, and the data itself: + * data:[][;base64], + * + * Generated from protobuf field string data_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDataUri() + { + return $this->readOneof(6); + } + + public function hasDataUri() + { + return $this->hasOneof(6); + } + + /** + * Optional. Data uri of the image. + * It is composed of four parts: a prefix (data:), a MIME type + * indicating the type of data, an optional base64 token if + * non-textual, and the data itself: + * data:[][;base64], + * + * Generated from protobuf field string data_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDataUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Mime type of the image. An IANA published [media type (MIME type)] + * (https://www.iana.org/assignments/media-types/media-types.xhtml). + * + * Generated from protobuf field string mime_type = 1; + * @return string + */ + public function getMimeType() + { + return $this->mime_type; + } + + /** + * Mime type of the image. An IANA published [media type (MIME type)] + * (https://www.iana.org/assignments/media-types/media-types.xhtml). + * + * Generated from protobuf field string mime_type = 1; + * @param string $var + * @return $this + */ + public function setMimeType($var) + { + GPBUtil::checkString($var, True); + $this->mime_type = $var; + + return $this; + } + + /** + * Text extracted from the image using OCR or alt text describing the + * image. + * + * Generated from protobuf field string image_text = 2; + * @return string + */ + public function getImageText() + { + return $this->image_text; + } + + /** + * Text extracted from the image using OCR or alt text describing the + * image. + * + * Generated from protobuf field string image_text = 2; + * @param string $var + * @return $this + */ + public function setImageText($var) + { + GPBUtil::checkString($var, True); + $this->image_text = $var; + + return $this; + } + + /** + * Annotation of the image block. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Annotations annotations = 3; + * @return \Google\Cloud\DocumentAI\V1\Document\Annotations|null + */ + public function getAnnotations() + { + return $this->annotations; + } + + public function hasAnnotations() + { + return isset($this->annotations); + } + + public function clearAnnotations() + { + unset($this->annotations); + } + + /** + * Annotation of the image block. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Annotations annotations = 3; + * @param \Google\Cloud\DocumentAI\V1\Document\Annotations $var + * @return $this + */ + public function setAnnotations($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Annotations::class); + $this->annotations = $var; + + return $this; + } + + /** + * @return string + */ + public function getImageSource() + { + return $this->whichOneof("image_source"); + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutListBlock.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutListBlock.php new file mode 100644 index 000000000000..e9bc8f8b92af --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutListBlock.php @@ -0,0 +1,105 @@ +google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock + */ +class LayoutListBlock extends \Google\Protobuf\Internal\Message +{ + /** + * List entries that constitute a list block. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + */ + private $list_entries; + /** + * Type of the list_entries (if exist). Available options are `ordered` + * and `unordered`. + * + * Generated from protobuf field string type = 2; + */ + protected $type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutListEntry[] $list_entries + * List entries that constitute a list block. + * @type string $type + * Type of the list_entries (if exist). Available options are `ordered` + * and `unordered`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * List entries that constitute a list block. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutListEntry> + */ + public function getListEntries() + { + return $this->list_entries; + } + + /** + * List entries that constitute a list block. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + * @param \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutListEntry[] $var + * @return $this + */ + public function setListEntries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutListEntry::class); + $this->list_entries = $arr; + + return $this; + } + + /** + * Type of the list_entries (if exist). Available options are `ordered` + * and `unordered`. + * + * Generated from protobuf field string type = 2; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Type of the list_entries (if exist). Available options are `ordered` + * and `unordered`. + * + * Generated from protobuf field string type = 2; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutListEntry.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutListEntry.php new file mode 100644 index 000000000000..5c7a9af390e9 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutListEntry.php @@ -0,0 +1,71 @@ +google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry + */ +class LayoutListEntry extends \Google\Protobuf\Internal\Message +{ + /** + * A list entry is a list of blocks. + * Repeated blocks support further hierarchies and nested blocks. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + */ + private $blocks; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock[] $blocks + * A list entry is a list of blocks. + * Repeated blocks support further hierarchies and nested blocks. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * A list entry is a list of blocks. + * Repeated blocks support further hierarchies and nested blocks. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock> + */ + public function getBlocks() + { + return $this->blocks; + } + + /** + * A list entry is a list of blocks. + * Repeated blocks support further hierarchies and nested blocks. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * @param \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock[] $var + * @return $this + */ + public function setBlocks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock::class); + $this->blocks = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutPageSpan.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutPageSpan.php new file mode 100644 index 000000000000..51aa9b02c19e --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutPageSpan.php @@ -0,0 +1,101 @@ +google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan + */ +class LayoutPageSpan extends \Google\Protobuf\Internal\Message +{ + /** + * Page where block starts in the document. + * + * Generated from protobuf field int32 page_start = 1; + */ + protected $page_start = 0; + /** + * Page where block ends in the document. + * + * Generated from protobuf field int32 page_end = 2; + */ + protected $page_end = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $page_start + * Page where block starts in the document. + * @type int $page_end + * Page where block ends in the document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Page where block starts in the document. + * + * Generated from protobuf field int32 page_start = 1; + * @return int + */ + public function getPageStart() + { + return $this->page_start; + } + + /** + * Page where block starts in the document. + * + * Generated from protobuf field int32 page_start = 1; + * @param int $var + * @return $this + */ + public function setPageStart($var) + { + GPBUtil::checkInt32($var); + $this->page_start = $var; + + return $this; + } + + /** + * Page where block ends in the document. + * + * Generated from protobuf field int32 page_end = 2; + * @return int + */ + public function getPageEnd() + { + return $this->page_end; + } + + /** + * Page where block ends in the document. + * + * Generated from protobuf field int32 page_end = 2; + * @param int $var + * @return $this + */ + public function setPageEnd($var) + { + GPBUtil::checkInt32($var); + $this->page_end = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTableBlock.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTableBlock.php new file mode 100644 index 000000000000..ca77f5876611 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTableBlock.php @@ -0,0 +1,179 @@ +google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock + */ +class LayoutTableBlock extends \Google\Protobuf\Internal\Message +{ + /** + * Header rows at the top of the table. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + */ + private $header_rows; + /** + * Body rows containing main table content. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + */ + private $body_rows; + /** + * Table caption/title. + * + * Generated from protobuf field string caption = 3; + */ + protected $caption = ''; + /** + * Annotation of the table block. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + protected $annotations = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableRow[] $header_rows + * Header rows at the top of the table. + * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableRow[] $body_rows + * Body rows containing main table content. + * @type string $caption + * Table caption/title. + * @type \Google\Cloud\DocumentAI\V1\Document\Annotations $annotations + * Annotation of the table block. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Header rows at the top of the table. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableRow> + */ + public function getHeaderRows() + { + return $this->header_rows; + } + + /** + * Header rows at the top of the table. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + * @param \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableRow[] $var + * @return $this + */ + public function setHeaderRows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableRow::class); + $this->header_rows = $arr; + + return $this; + } + + /** + * Body rows containing main table content. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableRow> + */ + public function getBodyRows() + { + return $this->body_rows; + } + + /** + * Body rows containing main table content. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + * @param \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableRow[] $var + * @return $this + */ + public function setBodyRows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableRow::class); + $this->body_rows = $arr; + + return $this; + } + + /** + * Table caption/title. + * + * Generated from protobuf field string caption = 3; + * @return string + */ + public function getCaption() + { + return $this->caption; + } + + /** + * Table caption/title. + * + * Generated from protobuf field string caption = 3; + * @param string $var + * @return $this + */ + public function setCaption($var) + { + GPBUtil::checkString($var, True); + $this->caption = $var; + + return $this; + } + + /** + * Annotation of the table block. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Annotations annotations = 4; + * @return \Google\Cloud\DocumentAI\V1\Document\Annotations|null + */ + public function getAnnotations() + { + return $this->annotations; + } + + public function hasAnnotations() + { + return isset($this->annotations); + } + + public function clearAnnotations() + { + unset($this->annotations); + } + + /** + * Annotation of the table block. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Annotations annotations = 4; + * @param \Google\Cloud\DocumentAI\V1\Document\Annotations $var + * @return $this + */ + public function setAnnotations($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Annotations::class); + $this->annotations = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTableCell.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTableCell.php new file mode 100644 index 000000000000..97505547be14 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTableCell.php @@ -0,0 +1,139 @@ +google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell + */ +class LayoutTableCell extends \Google\Protobuf\Internal\Message +{ + /** + * A table cell is a list of blocks. + * Repeated blocks support further hierarchies and nested blocks. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + */ + private $blocks; + /** + * How many rows this cell spans. + * + * Generated from protobuf field int32 row_span = 2; + */ + protected $row_span = 0; + /** + * How many columns this cell spans. + * + * Generated from protobuf field int32 col_span = 3; + */ + protected $col_span = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock[] $blocks + * A table cell is a list of blocks. + * Repeated blocks support further hierarchies and nested blocks. + * @type int $row_span + * How many rows this cell spans. + * @type int $col_span + * How many columns this cell spans. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * A table cell is a list of blocks. + * Repeated blocks support further hierarchies and nested blocks. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock> + */ + public function getBlocks() + { + return $this->blocks; + } + + /** + * A table cell is a list of blocks. + * Repeated blocks support further hierarchies and nested blocks. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * @param \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock[] $var + * @return $this + */ + public function setBlocks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock::class); + $this->blocks = $arr; + + return $this; + } + + /** + * How many rows this cell spans. + * + * Generated from protobuf field int32 row_span = 2; + * @return int + */ + public function getRowSpan() + { + return $this->row_span; + } + + /** + * How many rows this cell spans. + * + * Generated from protobuf field int32 row_span = 2; + * @param int $var + * @return $this + */ + public function setRowSpan($var) + { + GPBUtil::checkInt32($var); + $this->row_span = $var; + + return $this; + } + + /** + * How many columns this cell spans. + * + * Generated from protobuf field int32 col_span = 3; + * @return int + */ + public function getColSpan() + { + return $this->col_span; + } + + /** + * How many columns this cell spans. + * + * Generated from protobuf field int32 col_span = 3; + * @param int $var + * @return $this + */ + public function setColSpan($var) + { + GPBUtil::checkInt32($var); + $this->col_span = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTableRow.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTableRow.php new file mode 100644 index 000000000000..24a87501ec66 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTableRow.php @@ -0,0 +1,67 @@ +google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow + */ +class LayoutTableRow extends \Google\Protobuf\Internal\Message +{ + /** + * A table row is a list of table cells. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + */ + private $cells; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableCell[] $cells + * A table row is a list of table cells. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * A table row is a list of table cells. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableCell> + */ + public function getCells() + { + return $this->cells; + } + + /** + * A table row is a list of table cells. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + * @param \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableCell[] $var + * @return $this + */ + public function setCells($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableCell::class); + $this->cells = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTextBlock.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTextBlock.php new file mode 100644 index 000000000000..ca3cc05bb93d --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTextBlock.php @@ -0,0 +1,191 @@ +google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock + */ +class LayoutTextBlock extends \Google\Protobuf\Internal\Message +{ + /** + * Text content stored in the block. + * + * Generated from protobuf field string text = 1; + */ + protected $text = ''; + /** + * Type of the text in the block. Available options are: `paragraph`, + * `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, + * `heading-5`, `header`, `footer`. + * + * Generated from protobuf field string type = 2; + */ + protected $type = ''; + /** + * A text block could further have child blocks. + * Repeated blocks support further hierarchies and nested blocks. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + */ + private $blocks; + /** + * Annotation of the text block. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + protected $annotations = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * Text content stored in the block. + * @type string $type + * Type of the text in the block. Available options are: `paragraph`, + * `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, + * `heading-5`, `header`, `footer`. + * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock[] $blocks + * A text block could further have child blocks. + * Repeated blocks support further hierarchies and nested blocks. + * @type \Google\Cloud\DocumentAI\V1\Document\Annotations $annotations + * Annotation of the text block. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Text content stored in the block. + * + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * Text content stored in the block. + * + * Generated from protobuf field string text = 1; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + + /** + * Type of the text in the block. Available options are: `paragraph`, + * `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, + * `heading-5`, `header`, `footer`. + * + * Generated from protobuf field string type = 2; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Type of the text in the block. Available options are: `paragraph`, + * `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, + * `heading-5`, `header`, `footer`. + * + * Generated from protobuf field string type = 2; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * A text block could further have child blocks. + * Repeated blocks support further hierarchies and nested blocks. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock> + */ + public function getBlocks() + { + return $this->blocks; + } + + /** + * A text block could further have child blocks. + * Repeated blocks support further hierarchies and nested blocks. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + * @param \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock[] $var + * @return $this + */ + public function setBlocks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock::class); + $this->blocks = $arr; + + return $this; + } + + /** + * Annotation of the text block. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Annotations annotations = 4; + * @return \Google\Cloud\DocumentAI\V1\Document\Annotations|null + */ + public function getAnnotations() + { + return $this->annotations; + } + + public function hasAnnotations() + { + return isset($this->annotations); + } + + public function clearAnnotations() + { + unset($this->annotations); + } + + /** + * Annotation of the text block. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Annotations annotations = 4; + * @param \Google\Cloud\DocumentAI\V1\Document\Annotations $var + * @return $this + */ + public function setAnnotations($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Annotations::class); + $this->annotations = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntitiesRevision.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntitiesRevision.php new file mode 100644 index 000000000000..da63e9598c67 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntitiesRevision.php @@ -0,0 +1,145 @@ +google.cloud.documentai.v1.Document.EntitiesRevision + */ +class EntitiesRevision extends \Google\Protobuf\Internal\Message +{ + /** + * The revision id. + * + * Generated from protobuf field string revision_id = 1; + */ + protected $revision_id = ''; + /** + * The entities in this revision. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity entities = 2; + */ + private $entities; + /** + * The entity validation output for this revision. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.EntityValidationOutput entity_validation_output = 3; + */ + protected $entity_validation_output = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $revision_id + * The revision id. + * @type \Google\Cloud\DocumentAI\V1\Document\Entity[] $entities + * The entities in this revision. + * @type \Google\Cloud\DocumentAI\V1\Document\EntityValidationOutput $entity_validation_output + * The entity validation output for this revision. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * The revision id. + * + * Generated from protobuf field string revision_id = 1; + * @return string + */ + public function getRevisionId() + { + return $this->revision_id; + } + + /** + * The revision id. + * + * Generated from protobuf field string revision_id = 1; + * @param string $var + * @return $this + */ + public function setRevisionId($var) + { + GPBUtil::checkString($var, True); + $this->revision_id = $var; + + return $this; + } + + /** + * The entities in this revision. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity entities = 2; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Entity> + */ + public function getEntities() + { + return $this->entities; + } + + /** + * The entities in this revision. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity entities = 2; + * @param \Google\Cloud\DocumentAI\V1\Document\Entity[] $var + * @return $this + */ + public function setEntities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Entity::class); + $this->entities = $arr; + + return $this; + } + + /** + * The entity validation output for this revision. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.EntityValidationOutput entity_validation_output = 3; + * @return \Google\Cloud\DocumentAI\V1\Document\EntityValidationOutput|null + */ + public function getEntityValidationOutput() + { + return $this->entity_validation_output; + } + + public function hasEntityValidationOutput() + { + return isset($this->entity_validation_output); + } + + public function clearEntityValidationOutput() + { + unset($this->entity_validation_output); + } + + /** + * The entity validation output for this revision. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.EntityValidationOutput entity_validation_output = 3; + * @param \Google\Cloud\DocumentAI\V1\Document\EntityValidationOutput $var + * @return $this + */ + public function setEntityValidationOutput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\EntityValidationOutput::class); + $this->entity_validation_output = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Entity.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Entity.php new file mode 100644 index 000000000000..70e64e229c93 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Entity.php @@ -0,0 +1,523 @@ +google.cloud.documentai.v1.Document.Entity + */ +class Entity extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Provenance of the entity. + * Text anchor indexing into the + * [Document.text][google.cloud.documentai.v1.Document.text]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $text_anchor = null; + /** + * Required. Entity type from a schema, for example, `Address`. + * + * Generated from protobuf field string type = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = ''; + /** + * Optional. Text value of the entity, for example, `1600 Amphitheatre + * Pkwy`. + * + * Generated from protobuf field string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $mention_text = ''; + /** + * Optional. Deprecated. Use `id` field instead. + * + * Generated from protobuf field string mention_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $mention_id = ''; + /** + * Optional. Confidence of detected Schema entity. Range `[0, 1]`. + * + * Generated from protobuf field float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $confidence = 0.0; + /** + * Optional. Represents the provenance of this entity wrt. the location on + * the page where it was found. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_anchor = null; + /** + * Optional. Canonical id. This will be a unique value in the entity list + * for this document. + * + * Generated from protobuf field string id = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $id = ''; + /** + * Optional. Normalized entity value. Absent if the extracted value could + * not be converted or the type (for example, address) is not supported for + * certain parsers. This field is also only populated for certain supported + * document types. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Entity.NormalizedValue normalized_value = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $normalized_value = null; + /** + * Optional. Entities can be nested to form a hierarchical data structure + * representing the content in the document. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $properties; + /** + * Optional. The history of this annotation. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $provenance = null; + /** + * Optional. Whether the entity will be redacted for de-identification + * purposes. + * + * Generated from protobuf field bool redacted = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $redacted = false; + /** + * Optional. Specifies how the entity's value is obtained. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Entity.Method method = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $method = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document\TextAnchor $text_anchor + * Optional. Provenance of the entity. + * Text anchor indexing into the + * [Document.text][google.cloud.documentai.v1.Document.text]. + * @type string $type + * Required. Entity type from a schema, for example, `Address`. + * @type string $mention_text + * Optional. Text value of the entity, for example, `1600 Amphitheatre + * Pkwy`. + * @type string $mention_id + * Optional. Deprecated. Use `id` field instead. + * @type float $confidence + * Optional. Confidence of detected Schema entity. Range `[0, 1]`. + * @type \Google\Cloud\DocumentAI\V1\Document\PageAnchor $page_anchor + * Optional. Represents the provenance of this entity wrt. the location on + * the page where it was found. + * @type string $id + * Optional. Canonical id. This will be a unique value in the entity list + * for this document. + * @type \Google\Cloud\DocumentAI\V1\Document\Entity\NormalizedValue $normalized_value + * Optional. Normalized entity value. Absent if the extracted value could + * not be converted or the type (for example, address) is not supported for + * certain parsers. This field is also only populated for certain supported + * document types. + * @type \Google\Cloud\DocumentAI\V1\Document\Entity[] $properties + * Optional. Entities can be nested to form a hierarchical data structure + * representing the content in the document. + * @type \Google\Cloud\DocumentAI\V1\Document\Provenance $provenance + * Optional. The history of this annotation. + * @type bool $redacted + * Optional. Whether the entity will be redacted for de-identification + * purposes. + * @type int $method + * Optional. Specifies how the entity's value is obtained. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Provenance of the entity. + * Text anchor indexing into the + * [Document.text][google.cloud.documentai.v1.Document.text]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\DocumentAI\V1\Document\TextAnchor|null + */ + public function getTextAnchor() + { + return $this->text_anchor; + } + + public function hasTextAnchor() + { + return isset($this->text_anchor); + } + + public function clearTextAnchor() + { + unset($this->text_anchor); + } + + /** + * Optional. Provenance of the entity. + * Text anchor indexing into the + * [Document.text][google.cloud.documentai.v1.Document.text]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\DocumentAI\V1\Document\TextAnchor $var + * @return $this + */ + public function setTextAnchor($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\TextAnchor::class); + $this->text_anchor = $var; + + return $this; + } + + /** + * Required. Entity type from a schema, for example, `Address`. + * + * Generated from protobuf field string type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Required. Entity type from a schema, for example, `Address`. + * + * Generated from protobuf field string type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * Optional. Text value of the entity, for example, `1600 Amphitheatre + * Pkwy`. + * + * Generated from protobuf field string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMentionText() + { + return $this->mention_text; + } + + /** + * Optional. Text value of the entity, for example, `1600 Amphitheatre + * Pkwy`. + * + * Generated from protobuf field string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMentionText($var) + { + GPBUtil::checkString($var, True); + $this->mention_text = $var; + + return $this; + } + + /** + * Optional. Deprecated. Use `id` field instead. + * + * Generated from protobuf field string mention_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMentionId() + { + return $this->mention_id; + } + + /** + * Optional. Deprecated. Use `id` field instead. + * + * Generated from protobuf field string mention_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMentionId($var) + { + GPBUtil::checkString($var, True); + $this->mention_id = $var; + + return $this; + } + + /** + * Optional. Confidence of detected Schema entity. Range `[0, 1]`. + * + * Generated from protobuf field float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * Optional. Confidence of detected Schema entity. Range `[0, 1]`. + * + * Generated from protobuf field float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + + /** + * Optional. Represents the provenance of this entity wrt. the location on + * the page where it was found. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\DocumentAI\V1\Document\PageAnchor|null + */ + public function getPageAnchor() + { + return $this->page_anchor; + } + + public function hasPageAnchor() + { + return isset($this->page_anchor); + } + + public function clearPageAnchor() + { + unset($this->page_anchor); + } + + /** + * Optional. Represents the provenance of this entity wrt. the location on + * the page where it was found. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\DocumentAI\V1\Document\PageAnchor $var + * @return $this + */ + public function setPageAnchor($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\PageAnchor::class); + $this->page_anchor = $var; + + return $this; + } + + /** + * Optional. Canonical id. This will be a unique value in the entity list + * for this document. + * + * Generated from protobuf field string id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Optional. Canonical id. This will be a unique value in the entity list + * for this document. + * + * Generated from protobuf field string id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Optional. Normalized entity value. Absent if the extracted value could + * not be converted or the type (for example, address) is not supported for + * certain parsers. This field is also only populated for certain supported + * document types. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Entity.NormalizedValue normalized_value = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\DocumentAI\V1\Document\Entity\NormalizedValue|null + */ + public function getNormalizedValue() + { + return $this->normalized_value; + } + + public function hasNormalizedValue() + { + return isset($this->normalized_value); + } + + public function clearNormalizedValue() + { + unset($this->normalized_value); + } + + /** + * Optional. Normalized entity value. Absent if the extracted value could + * not be converted or the type (for example, address) is not supported for + * certain parsers. This field is also only populated for certain supported + * document types. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Entity.NormalizedValue normalized_value = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\DocumentAI\V1\Document\Entity\NormalizedValue $var + * @return $this + */ + public function setNormalizedValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Entity\NormalizedValue::class); + $this->normalized_value = $var; + + return $this; + } + + /** + * Optional. Entities can be nested to form a hierarchical data structure + * representing the content in the document. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Entity> + */ + public function getProperties() + { + return $this->properties; + } + + /** + * Optional. Entities can be nested to form a hierarchical data structure + * representing the content in the document. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\DocumentAI\V1\Document\Entity[] $var + * @return $this + */ + public function setProperties($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Entity::class); + $this->properties = $arr; + + return $this; + } + + /** + * Optional. The history of this annotation. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\DocumentAI\V1\Document\Provenance|null + */ + public function getProvenance() + { + return $this->provenance; + } + + public function hasProvenance() + { + return isset($this->provenance); + } + + public function clearProvenance() + { + unset($this->provenance); + } + + /** + * Optional. The history of this annotation. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\DocumentAI\V1\Document\Provenance $var + * @return $this + */ + public function setProvenance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Provenance::class); + $this->provenance = $var; + + return $this; + } + + /** + * Optional. Whether the entity will be redacted for de-identification + * purposes. + * + * Generated from protobuf field bool redacted = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getRedacted() + { + return $this->redacted; + } + + /** + * Optional. Whether the entity will be redacted for de-identification + * purposes. + * + * Generated from protobuf field bool redacted = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setRedacted($var) + { + GPBUtil::checkBool($var); + $this->redacted = $var; + + return $this; + } + + /** + * Optional. Specifies how the entity's value is obtained. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Entity.Method method = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMethod() + { + return $this->method; + } + + /** + * Optional. Specifies how the entity's value is obtained. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Entity.Method method = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMethod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\Document\Entity\Method::class); + $this->method = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Entity/Method.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Entity/Method.php new file mode 100644 index 000000000000..2e4723041898 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Entity/Method.php @@ -0,0 +1,63 @@ +google.cloud.documentai.v1.Document.Entity.Method + */ +class Method +{ + /** + * When the method is not specified, it should be treated as `EXTRACT`. + * + * Generated from protobuf enum METHOD_UNSPECIFIED = 0; + */ + const METHOD_UNSPECIFIED = 0; + /** + * The entity's value is directly extracted as-is from the document + * text. + * + * Generated from protobuf enum EXTRACT = 1; + */ + const EXTRACT = 1; + /** + * The entity's value is derived through inference and is not + * necessarily an exact text extraction from the document. + * + * Generated from protobuf enum DERIVE = 2; + */ + const DERIVE = 2; + + private static $valueToName = [ + self::METHOD_UNSPECIFIED => 'METHOD_UNSPECIFIED', + self::EXTRACT => 'EXTRACT', + self::DERIVE => 'DERIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Entity/NormalizedValue.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Entity/NormalizedValue.php new file mode 100644 index 000000000000..cd09e678f3d2 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Entity/NormalizedValue.php @@ -0,0 +1,390 @@ +google.cloud.documentai.v1.Document.Entity.NormalizedValue + */ +class NormalizedValue extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. An optional field to store a normalized string. + * For some entity types, one of respective `structured_value` fields may + * also be populated. Also not all the types of `structured_value` will be + * normalized. For example, some processors may not generate `float` + * or `integer` normalized text by default. + * Below are sample formats mapped to structured values. + * - Money/Currency type (`money_value`) is in the ISO 4217 text format. + * - Date type (`date_value`) is in the ISO 8601 text format. + * - Datetime type (`datetime_value`) is in the ISO 8601 text format. + * + * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $text = ''; + protected $structured_value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\Money $money_value + * Money value. See also: + * https://github.com/googleapis/googleapis/blob/master/google/type/money.proto + * @type \Google\Type\Date $date_value + * Date value. Includes year, month, day. See also: + * https://github.com/googleapis/googleapis/blob/master/google/type/date.proto + * @type \Google\Type\DateTime $datetime_value + * DateTime value. Includes date, time, and timezone. See also: + * https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto + * @type \Google\Type\PostalAddress $address_value + * Postal address. See also: + * https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto + * @type bool $boolean_value + * Boolean value. Can be used for entities with binary values, or for + * checkboxes. + * @type int $integer_value + * Integer value. + * @type float $float_value + * Float value. + * @type bool $signature_value + * A signature - a graphical representation of a person's name, + * often used to sign a document. + * @type string $text + * Optional. An optional field to store a normalized string. + * For some entity types, one of respective `structured_value` fields may + * also be populated. Also not all the types of `structured_value` will be + * normalized. For example, some processors may not generate `float` + * or `integer` normalized text by default. + * Below are sample formats mapped to structured values. + * - Money/Currency type (`money_value`) is in the ISO 4217 text format. + * - Date type (`date_value`) is in the ISO 8601 text format. + * - Datetime type (`datetime_value`) is in the ISO 8601 text format. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Money value. See also: + * https://github.com/googleapis/googleapis/blob/master/google/type/money.proto + * + * Generated from protobuf field .google.type.Money money_value = 2; + * @return \Google\Type\Money|null + */ + public function getMoneyValue() + { + return $this->readOneof(2); + } + + public function hasMoneyValue() + { + return $this->hasOneof(2); + } + + /** + * Money value. See also: + * https://github.com/googleapis/googleapis/blob/master/google/type/money.proto + * + * Generated from protobuf field .google.type.Money money_value = 2; + * @param \Google\Type\Money $var + * @return $this + */ + public function setMoneyValue($var) + { + GPBUtil::checkMessage($var, \Google\Type\Money::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Date value. Includes year, month, day. See also: + * https://github.com/googleapis/googleapis/blob/master/google/type/date.proto + * + * Generated from protobuf field .google.type.Date date_value = 3; + * @return \Google\Type\Date|null + */ + public function getDateValue() + { + return $this->readOneof(3); + } + + public function hasDateValue() + { + return $this->hasOneof(3); + } + + /** + * Date value. Includes year, month, day. See also: + * https://github.com/googleapis/googleapis/blob/master/google/type/date.proto + * + * Generated from protobuf field .google.type.Date date_value = 3; + * @param \Google\Type\Date $var + * @return $this + */ + public function setDateValue($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * DateTime value. Includes date, time, and timezone. See also: + * https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto + * + * Generated from protobuf field .google.type.DateTime datetime_value = 4; + * @return \Google\Type\DateTime|null + */ + public function getDatetimeValue() + { + return $this->readOneof(4); + } + + public function hasDatetimeValue() + { + return $this->hasOneof(4); + } + + /** + * DateTime value. Includes date, time, and timezone. See also: + * https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto + * + * Generated from protobuf field .google.type.DateTime datetime_value = 4; + * @param \Google\Type\DateTime $var + * @return $this + */ + public function setDatetimeValue($var) + { + GPBUtil::checkMessage($var, \Google\Type\DateTime::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Postal address. See also: + * https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto + * + * Generated from protobuf field .google.type.PostalAddress address_value = 5; + * @return \Google\Type\PostalAddress|null + */ + public function getAddressValue() + { + return $this->readOneof(5); + } + + public function hasAddressValue() + { + return $this->hasOneof(5); + } + + /** + * Postal address. See also: + * https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto + * + * Generated from protobuf field .google.type.PostalAddress address_value = 5; + * @param \Google\Type\PostalAddress $var + * @return $this + */ + public function setAddressValue($var) + { + GPBUtil::checkMessage($var, \Google\Type\PostalAddress::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Boolean value. Can be used for entities with binary values, or for + * checkboxes. + * + * Generated from protobuf field bool boolean_value = 6; + * @return bool + */ + public function getBooleanValue() + { + return $this->readOneof(6); + } + + public function hasBooleanValue() + { + return $this->hasOneof(6); + } + + /** + * Boolean value. Can be used for entities with binary values, or for + * checkboxes. + * + * Generated from protobuf field bool boolean_value = 6; + * @param bool $var + * @return $this + */ + public function setBooleanValue($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Integer value. + * + * Generated from protobuf field int32 integer_value = 7; + * @return int + */ + public function getIntegerValue() + { + return $this->readOneof(7); + } + + public function hasIntegerValue() + { + return $this->hasOneof(7); + } + + /** + * Integer value. + * + * Generated from protobuf field int32 integer_value = 7; + * @param int $var + * @return $this + */ + public function setIntegerValue($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Float value. + * + * Generated from protobuf field float float_value = 8; + * @return float + */ + public function getFloatValue() + { + return $this->readOneof(8); + } + + public function hasFloatValue() + { + return $this->hasOneof(8); + } + + /** + * Float value. + * + * Generated from protobuf field float float_value = 8; + * @param float $var + * @return $this + */ + public function setFloatValue($var) + { + GPBUtil::checkFloat($var); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * A signature - a graphical representation of a person's name, + * often used to sign a document. + * + * Generated from protobuf field bool signature_value = 10; + * @return bool + */ + public function getSignatureValue() + { + return $this->readOneof(10); + } + + public function hasSignatureValue() + { + return $this->hasOneof(10); + } + + /** + * A signature - a graphical representation of a person's name, + * often used to sign a document. + * + * Generated from protobuf field bool signature_value = 10; + * @param bool $var + * @return $this + */ + public function setSignatureValue($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Optional. An optional field to store a normalized string. + * For some entity types, one of respective `structured_value` fields may + * also be populated. Also not all the types of `structured_value` will be + * normalized. For example, some processors may not generate `float` + * or `integer` normalized text by default. + * Below are sample formats mapped to structured values. + * - Money/Currency type (`money_value`) is in the ISO 4217 text format. + * - Date type (`date_value`) is in the ISO 8601 text format. + * - Datetime type (`datetime_value`) is in the ISO 8601 text format. + * + * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * Optional. An optional field to store a normalized string. + * For some entity types, one of respective `structured_value` fields may + * also be populated. Also not all the types of `structured_value` will be + * normalized. For example, some processors may not generate `float` + * or `integer` normalized text by default. + * Below are sample formats mapped to structured values. + * - Money/Currency type (`money_value`) is in the ISO 4217 text format. + * - Date type (`date_value`) is in the ISO 8601 text format. + * - Datetime type (`datetime_value`) is in the ISO 8601 text format. + * + * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + + /** + * @return string + */ + public function getStructuredValue() + { + return $this->whichOneof("structured_value"); + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityRelation.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityRelation.php new file mode 100644 index 000000000000..93344d0ccd38 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityRelation.php @@ -0,0 +1,136 @@ +google.cloud.documentai.v1.Document.EntityRelation + */ +class EntityRelation extends \Google\Protobuf\Internal\Message +{ + /** + * Subject entity id. + * + * Generated from protobuf field string subject_id = 1; + */ + protected $subject_id = ''; + /** + * Object entity id. + * + * Generated from protobuf field string object_id = 2; + */ + protected $object_id = ''; + /** + * Relationship description. + * + * Generated from protobuf field string relation = 3; + */ + protected $relation = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $subject_id + * Subject entity id. + * @type string $object_id + * Object entity id. + * @type string $relation + * Relationship description. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Subject entity id. + * + * Generated from protobuf field string subject_id = 1; + * @return string + */ + public function getSubjectId() + { + return $this->subject_id; + } + + /** + * Subject entity id. + * + * Generated from protobuf field string subject_id = 1; + * @param string $var + * @return $this + */ + public function setSubjectId($var) + { + GPBUtil::checkString($var, True); + $this->subject_id = $var; + + return $this; + } + + /** + * Object entity id. + * + * Generated from protobuf field string object_id = 2; + * @return string + */ + public function getObjectId() + { + return $this->object_id; + } + + /** + * Object entity id. + * + * Generated from protobuf field string object_id = 2; + * @param string $var + * @return $this + */ + public function setObjectId($var) + { + GPBUtil::checkString($var, True); + $this->object_id = $var; + + return $this; + } + + /** + * Relationship description. + * + * Generated from protobuf field string relation = 3; + * @return string + */ + public function getRelation() + { + return $this->relation; + } + + /** + * Relationship description. + * + * Generated from protobuf field string relation = 3; + * @param string $var + * @return $this + */ + public function setRelation($var) + { + GPBUtil::checkString($var, True); + $this->relation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityValidationOutput.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityValidationOutput.php new file mode 100644 index 000000000000..3e33ca02c2d8 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityValidationOutput.php @@ -0,0 +1,105 @@ +google.cloud.documentai.v1.Document.EntityValidationOutput + */ +class EntityValidationOutput extends \Google\Protobuf\Internal\Message +{ + /** + * The result of each validation rule. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult validation_results = 1; + */ + private $validation_results; + /** + * The overall result of the validation, true if all applicable rules are + * valid. + * + * Generated from protobuf field bool pass_all_rules = 2; + */ + protected $pass_all_rules = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document\EntityValidationOutput\ValidationResult[] $validation_results + * The result of each validation rule. + * @type bool $pass_all_rules + * The overall result of the validation, true if all applicable rules are + * valid. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * The result of each validation rule. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult validation_results = 1; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\EntityValidationOutput\ValidationResult> + */ + public function getValidationResults() + { + return $this->validation_results; + } + + /** + * The result of each validation rule. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult validation_results = 1; + * @param \Google\Cloud\DocumentAI\V1\Document\EntityValidationOutput\ValidationResult[] $var + * @return $this + */ + public function setValidationResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\EntityValidationOutput\ValidationResult::class); + $this->validation_results = $arr; + + return $this; + } + + /** + * The overall result of the validation, true if all applicable rules are + * valid. + * + * Generated from protobuf field bool pass_all_rules = 2; + * @return bool + */ + public function getPassAllRules() + { + return $this->pass_all_rules; + } + + /** + * The overall result of the validation, true if all applicable rules are + * valid. + * + * Generated from protobuf field bool pass_all_rules = 2; + * @param bool $var + * @return $this + */ + public function setPassAllRules($var) + { + GPBUtil::checkBool($var); + $this->pass_all_rules = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityValidationOutput/ValidationResult.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityValidationOutput/ValidationResult.php new file mode 100644 index 000000000000..fad866d5bdd4 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityValidationOutput/ValidationResult.php @@ -0,0 +1,173 @@ +google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult + */ +class ValidationResult extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the validation rule. + * + * Generated from protobuf field string rule_name = 1; + */ + protected $rule_name = ''; + /** + * The description of the validation rule. + * + * Generated from protobuf field string rule_description = 2; + */ + protected $rule_description = ''; + /** + * The result of the validation rule. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult.ValidationResultType validation_result_type = 3; + */ + protected $validation_result_type = 0; + /** + * The detailed information of the running the validation process using + * the entity from the document based on the validation rule. + * + * Generated from protobuf field string validation_details = 4; + */ + protected $validation_details = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $rule_name + * The name of the validation rule. + * @type string $rule_description + * The description of the validation rule. + * @type int $validation_result_type + * The result of the validation rule. + * @type string $validation_details + * The detailed information of the running the validation process using + * the entity from the document based on the validation rule. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * The name of the validation rule. + * + * Generated from protobuf field string rule_name = 1; + * @return string + */ + public function getRuleName() + { + return $this->rule_name; + } + + /** + * The name of the validation rule. + * + * Generated from protobuf field string rule_name = 1; + * @param string $var + * @return $this + */ + public function setRuleName($var) + { + GPBUtil::checkString($var, True); + $this->rule_name = $var; + + return $this; + } + + /** + * The description of the validation rule. + * + * Generated from protobuf field string rule_description = 2; + * @return string + */ + public function getRuleDescription() + { + return $this->rule_description; + } + + /** + * The description of the validation rule. + * + * Generated from protobuf field string rule_description = 2; + * @param string $var + * @return $this + */ + public function setRuleDescription($var) + { + GPBUtil::checkString($var, True); + $this->rule_description = $var; + + return $this; + } + + /** + * The result of the validation rule. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult.ValidationResultType validation_result_type = 3; + * @return int + */ + public function getValidationResultType() + { + return $this->validation_result_type; + } + + /** + * The result of the validation rule. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult.ValidationResultType validation_result_type = 3; + * @param int $var + * @return $this + */ + public function setValidationResultType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\Document\EntityValidationOutput\ValidationResult\ValidationResultType::class); + $this->validation_result_type = $var; + + return $this; + } + + /** + * The detailed information of the running the validation process using + * the entity from the document based on the validation rule. + * + * Generated from protobuf field string validation_details = 4; + * @return string + */ + public function getValidationDetails() + { + return $this->validation_details; + } + + /** + * The detailed information of the running the validation process using + * the entity from the document based on the validation rule. + * + * Generated from protobuf field string validation_details = 4; + * @param string $var + * @return $this + */ + public function setValidationDetails($var) + { + GPBUtil::checkString($var, True); + $this->validation_details = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityValidationOutput/ValidationResult/ValidationResultType.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityValidationOutput/ValidationResult/ValidationResultType.php new file mode 100644 index 000000000000..5d1c7eebdbaf --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityValidationOutput/ValidationResult/ValidationResultType.php @@ -0,0 +1,75 @@ +google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult.ValidationResultType + */ +class ValidationResultType +{ + /** + * The validation result type is unspecified. + * + * Generated from protobuf enum VALIDATION_RESULT_TYPE_UNSPECIFIED = 0; + */ + const VALIDATION_RESULT_TYPE_UNSPECIFIED = 0; + /** + * The validation is valid. + * + * Generated from protobuf enum VALIDATION_RESULT_TYPE_VALID = 1; + */ + const VALIDATION_RESULT_TYPE_VALID = 1; + /** + * The validation is invalid. + * + * Generated from protobuf enum VALIDATION_RESULT_TYPE_INVALID = 2; + */ + const VALIDATION_RESULT_TYPE_INVALID = 2; + /** + * The validation is skipped. + * + * Generated from protobuf enum VALIDATION_RESULT_TYPE_SKIPPED = 3; + */ + const VALIDATION_RESULT_TYPE_SKIPPED = 3; + /** + * The validation is not applicable. + * + * Generated from protobuf enum VALIDATION_RESULT_TYPE_NOT_APPLICABLE = 4; + */ + const VALIDATION_RESULT_TYPE_NOT_APPLICABLE = 4; + + private static $valueToName = [ + self::VALIDATION_RESULT_TYPE_UNSPECIFIED => 'VALIDATION_RESULT_TYPE_UNSPECIFIED', + self::VALIDATION_RESULT_TYPE_VALID => 'VALIDATION_RESULT_TYPE_VALID', + self::VALIDATION_RESULT_TYPE_INVALID => 'VALIDATION_RESULT_TYPE_INVALID', + self::VALIDATION_RESULT_TYPE_SKIPPED => 'VALIDATION_RESULT_TYPE_SKIPPED', + self::VALIDATION_RESULT_TYPE_NOT_APPLICABLE => 'VALIDATION_RESULT_TYPE_NOT_APPLICABLE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page.php new file mode 100644 index 000000000000..37a47edf43a9 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page.php @@ -0,0 +1,720 @@ +google.cloud.documentai.v1.Document.Page + */ +class Page extends \Google\Protobuf\Internal\Message +{ + /** + * 1-based index for current + * [Page][google.cloud.documentai.v1.Document.Page] in a parent + * [Document][google.cloud.documentai.v1.Document]. Useful when a page is + * taken out of a [Document][google.cloud.documentai.v1.Document] for + * individual processing. + * + * Generated from protobuf field int32 page_number = 1; + */ + protected $page_number = 0; + /** + * Rendered image for this page. This image is preprocessed to remove any + * skew, rotation, and distortions such that the annotation bounding boxes + * can be upright and axis-aligned. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Image image = 13; + */ + protected $image = null; + /** + * Transformation matrices that were applied to the original document image + * to produce [Page.image][google.cloud.documentai.v1.Document.Page.image]. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Matrix transforms = 14; + */ + private $transforms; + /** + * Physical dimension of the page. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Dimension dimension = 2; + */ + protected $dimension = null; + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the page. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 3; + */ + protected $layout = null; + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 4; + */ + private $detected_languages; + /** + * A list of visually detected text blocks on the page. + * A block has a set of lines (collected into paragraphs) that have a common + * line-spacing and orientation. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Block blocks = 5; + */ + private $blocks; + /** + * A list of visually detected text paragraphs on the page. + * A collection of lines that a human would perceive as a paragraph. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Paragraph paragraphs = 6; + */ + private $paragraphs; + /** + * A list of visually detected text lines on the page. + * A collection of tokens that a human would perceive as a line. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Line lines = 7; + */ + private $lines; + /** + * A list of visually detected tokens on the page. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Token tokens = 8; + */ + private $tokens; + /** + * A list of detected non-text visual elements, for example, checkbox, + * signature etc. on the page. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.VisualElement visual_elements = 9; + */ + private $visual_elements; + /** + * A list of visually detected tables on the page. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Table tables = 10; + */ + private $tables; + /** + * A list of visually detected form fields on the page. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.FormField form_fields = 11; + */ + private $form_fields; + /** + * A list of visually detected symbols on the page. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Symbol symbols = 12; + */ + private $symbols; + /** + * A list of detected barcodes. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedBarcode detected_barcodes = 15; + */ + private $detected_barcodes; + /** + * Image quality scores. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.ImageQualityScores image_quality_scores = 17; + */ + protected $image_quality_scores = null; + /** + * The history of this page. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 16 [deprecated = true]; + * @deprecated + */ + protected $provenance = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $page_number + * 1-based index for current + * [Page][google.cloud.documentai.v1.Document.Page] in a parent + * [Document][google.cloud.documentai.v1.Document]. Useful when a page is + * taken out of a [Document][google.cloud.documentai.v1.Document] for + * individual processing. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\Image $image + * Rendered image for this page. This image is preprocessed to remove any + * skew, rotation, and distortions such that the annotation bounding boxes + * can be upright and axis-aligned. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\Matrix[] $transforms + * Transformation matrices that were applied to the original document image + * to produce [Page.image][google.cloud.documentai.v1.Document.Page.image]. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\Dimension $dimension + * Physical dimension of the page. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the page. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $detected_languages + * A list of detected languages together with confidence. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\Block[] $blocks + * A list of visually detected text blocks on the page. + * A block has a set of lines (collected into paragraphs) that have a common + * line-spacing and orientation. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\Paragraph[] $paragraphs + * A list of visually detected text paragraphs on the page. + * A collection of lines that a human would perceive as a paragraph. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\Line[] $lines + * A list of visually detected text lines on the page. + * A collection of tokens that a human would perceive as a line. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\Token[] $tokens + * A list of visually detected tokens on the page. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\VisualElement[] $visual_elements + * A list of detected non-text visual elements, for example, checkbox, + * signature etc. on the page. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\Table[] $tables + * A list of visually detected tables on the page. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\FormField[] $form_fields + * A list of visually detected form fields on the page. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\Symbol[] $symbols + * A list of visually detected symbols on the page. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\DetectedBarcode[] $detected_barcodes + * A list of detected barcodes. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\ImageQualityScores $image_quality_scores + * Image quality scores. + * @type \Google\Cloud\DocumentAI\V1\Document\Provenance $provenance + * The history of this page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * 1-based index for current + * [Page][google.cloud.documentai.v1.Document.Page] in a parent + * [Document][google.cloud.documentai.v1.Document]. Useful when a page is + * taken out of a [Document][google.cloud.documentai.v1.Document] for + * individual processing. + * + * Generated from protobuf field int32 page_number = 1; + * @return int + */ + public function getPageNumber() + { + return $this->page_number; + } + + /** + * 1-based index for current + * [Page][google.cloud.documentai.v1.Document.Page] in a parent + * [Document][google.cloud.documentai.v1.Document]. Useful when a page is + * taken out of a [Document][google.cloud.documentai.v1.Document] for + * individual processing. + * + * Generated from protobuf field int32 page_number = 1; + * @param int $var + * @return $this + */ + public function setPageNumber($var) + { + GPBUtil::checkInt32($var); + $this->page_number = $var; + + return $this; + } + + /** + * Rendered image for this page. This image is preprocessed to remove any + * skew, rotation, and distortions such that the annotation bounding boxes + * can be upright and axis-aligned. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Image image = 13; + * @return \Google\Cloud\DocumentAI\V1\Document\Page\Image|null + */ + public function getImage() + { + return $this->image; + } + + public function hasImage() + { + return isset($this->image); + } + + public function clearImage() + { + unset($this->image); + } + + /** + * Rendered image for this page. This image is preprocessed to remove any + * skew, rotation, and distortions such that the annotation bounding boxes + * can be upright and axis-aligned. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Image image = 13; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\Image $var + * @return $this + */ + public function setImage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Image::class); + $this->image = $var; + + return $this; + } + + /** + * Transformation matrices that were applied to the original document image + * to produce [Page.image][google.cloud.documentai.v1.Document.Page.image]. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Matrix transforms = 14; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\Matrix> + */ + public function getTransforms() + { + return $this->transforms; + } + + /** + * Transformation matrices that were applied to the original document image + * to produce [Page.image][google.cloud.documentai.v1.Document.Page.image]. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Matrix transforms = 14; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\Matrix[] $var + * @return $this + */ + public function setTransforms($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\Matrix::class); + $this->transforms = $arr; + + return $this; + } + + /** + * Physical dimension of the page. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Dimension dimension = 2; + * @return \Google\Cloud\DocumentAI\V1\Document\Page\Dimension|null + */ + public function getDimension() + { + return $this->dimension; + } + + public function hasDimension() + { + return isset($this->dimension); + } + + public function clearDimension() + { + unset($this->dimension); + } + + /** + * Physical dimension of the page. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Dimension dimension = 2; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\Dimension $var + * @return $this + */ + public function setDimension($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Dimension::class); + $this->dimension = $var; + + return $this; + } + + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the page. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 3; + * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null + */ + public function getLayout() + { + return $this->layout; + } + + public function hasLayout() + { + return isset($this->layout); + } + + public function clearLayout() + { + unset($this->layout); + } + + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the page. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 3; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var + * @return $this + */ + public function setLayout($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Layout::class); + $this->layout = $var; + + return $this; + } + + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 4; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage> + */ + public function getDetectedLanguages() + { + return $this->detected_languages; + } + + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 4; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $var + * @return $this + */ + public function setDetectedLanguages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage::class); + $this->detected_languages = $arr; + + return $this; + } + + /** + * A list of visually detected text blocks on the page. + * A block has a set of lines (collected into paragraphs) that have a common + * line-spacing and orientation. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Block blocks = 5; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\Block> + */ + public function getBlocks() + { + return $this->blocks; + } + + /** + * A list of visually detected text blocks on the page. + * A block has a set of lines (collected into paragraphs) that have a common + * line-spacing and orientation. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Block blocks = 5; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\Block[] $var + * @return $this + */ + public function setBlocks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\Block::class); + $this->blocks = $arr; + + return $this; + } + + /** + * A list of visually detected text paragraphs on the page. + * A collection of lines that a human would perceive as a paragraph. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Paragraph paragraphs = 6; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\Paragraph> + */ + public function getParagraphs() + { + return $this->paragraphs; + } + + /** + * A list of visually detected text paragraphs on the page. + * A collection of lines that a human would perceive as a paragraph. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Paragraph paragraphs = 6; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\Paragraph[] $var + * @return $this + */ + public function setParagraphs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\Paragraph::class); + $this->paragraphs = $arr; + + return $this; + } + + /** + * A list of visually detected text lines on the page. + * A collection of tokens that a human would perceive as a line. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Line lines = 7; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\Line> + */ + public function getLines() + { + return $this->lines; + } + + /** + * A list of visually detected text lines on the page. + * A collection of tokens that a human would perceive as a line. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Line lines = 7; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\Line[] $var + * @return $this + */ + public function setLines($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\Line::class); + $this->lines = $arr; + + return $this; + } + + /** + * A list of visually detected tokens on the page. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Token tokens = 8; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\Token> + */ + public function getTokens() + { + return $this->tokens; + } + + /** + * A list of visually detected tokens on the page. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Token tokens = 8; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\Token[] $var + * @return $this + */ + public function setTokens($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\Token::class); + $this->tokens = $arr; + + return $this; + } + + /** + * A list of detected non-text visual elements, for example, checkbox, + * signature etc. on the page. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.VisualElement visual_elements = 9; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\VisualElement> + */ + public function getVisualElements() + { + return $this->visual_elements; + } + + /** + * A list of detected non-text visual elements, for example, checkbox, + * signature etc. on the page. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.VisualElement visual_elements = 9; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\VisualElement[] $var + * @return $this + */ + public function setVisualElements($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\VisualElement::class); + $this->visual_elements = $arr; + + return $this; + } + + /** + * A list of visually detected tables on the page. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Table tables = 10; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\Table> + */ + public function getTables() + { + return $this->tables; + } + + /** + * A list of visually detected tables on the page. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Table tables = 10; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\Table[] $var + * @return $this + */ + public function setTables($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\Table::class); + $this->tables = $arr; + + return $this; + } + + /** + * A list of visually detected form fields on the page. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.FormField form_fields = 11; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\FormField> + */ + public function getFormFields() + { + return $this->form_fields; + } + + /** + * A list of visually detected form fields on the page. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.FormField form_fields = 11; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\FormField[] $var + * @return $this + */ + public function setFormFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\FormField::class); + $this->form_fields = $arr; + + return $this; + } + + /** + * A list of visually detected symbols on the page. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Symbol symbols = 12; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\Symbol> + */ + public function getSymbols() + { + return $this->symbols; + } + + /** + * A list of visually detected symbols on the page. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Symbol symbols = 12; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\Symbol[] $var + * @return $this + */ + public function setSymbols($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\Symbol::class); + $this->symbols = $arr; + + return $this; + } + + /** + * A list of detected barcodes. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedBarcode detected_barcodes = 15; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedBarcode> + */ + public function getDetectedBarcodes() + { + return $this->detected_barcodes; + } + + /** + * A list of detected barcodes. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedBarcode detected_barcodes = 15; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\DetectedBarcode[] $var + * @return $this + */ + public function setDetectedBarcodes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\DetectedBarcode::class); + $this->detected_barcodes = $arr; + + return $this; + } + + /** + * Image quality scores. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.ImageQualityScores image_quality_scores = 17; + * @return \Google\Cloud\DocumentAI\V1\Document\Page\ImageQualityScores|null + */ + public function getImageQualityScores() + { + return $this->image_quality_scores; + } + + public function hasImageQualityScores() + { + return isset($this->image_quality_scores); + } + + public function clearImageQualityScores() + { + unset($this->image_quality_scores); + } + + /** + * Image quality scores. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.ImageQualityScores image_quality_scores = 17; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\ImageQualityScores $var + * @return $this + */ + public function setImageQualityScores($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\ImageQualityScores::class); + $this->image_quality_scores = $var; + + return $this; + } + + /** + * The history of this page. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 16 [deprecated = true]; + * @return \Google\Cloud\DocumentAI\V1\Document\Provenance|null + * @deprecated + */ + public function getProvenance() + { + if (isset($this->provenance)) { + @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); + } + return $this->provenance; + } + + public function hasProvenance() + { + if (isset($this->provenance)) { + @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); + } + return isset($this->provenance); + } + + public function clearProvenance() + { + @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); + unset($this->provenance); + } + + /** + * The history of this page. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 16 [deprecated = true]; + * @param \Google\Cloud\DocumentAI\V1\Document\Provenance $var + * @return $this + * @deprecated + */ + public function setProvenance($var) + { + @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Provenance::class); + $this->provenance = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Block.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Block.php new file mode 100644 index 000000000000..a405a9a4d030 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Block.php @@ -0,0 +1,171 @@ +google.cloud.documentai.v1.Document.Page.Block + */ +class Block extends \Google\Protobuf\Internal\Message +{ + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [Block][google.cloud.documentai.v1.Document.Page.Block]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; + */ + protected $layout = null; + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 2; + */ + private $detected_languages; + /** + * The history of this annotation. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; + * @deprecated + */ + protected $provenance = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [Block][google.cloud.documentai.v1.Document.Page.Block]. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $detected_languages + * A list of detected languages together with confidence. + * @type \Google\Cloud\DocumentAI\V1\Document\Provenance $provenance + * The history of this annotation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [Block][google.cloud.documentai.v1.Document.Page.Block]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; + * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null + */ + public function getLayout() + { + return $this->layout; + } + + public function hasLayout() + { + return isset($this->layout); + } + + public function clearLayout() + { + unset($this->layout); + } + + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [Block][google.cloud.documentai.v1.Document.Page.Block]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var + * @return $this + */ + public function setLayout($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Layout::class); + $this->layout = $var; + + return $this; + } + + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 2; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage> + */ + public function getDetectedLanguages() + { + return $this->detected_languages; + } + + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 2; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $var + * @return $this + */ + public function setDetectedLanguages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage::class); + $this->detected_languages = $arr; + + return $this; + } + + /** + * The history of this annotation. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; + * @return \Google\Cloud\DocumentAI\V1\Document\Provenance|null + * @deprecated + */ + public function getProvenance() + { + if (isset($this->provenance)) { + @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); + } + return $this->provenance; + } + + public function hasProvenance() + { + if (isset($this->provenance)) { + @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); + } + return isset($this->provenance); + } + + public function clearProvenance() + { + @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); + unset($this->provenance); + } + + /** + * The history of this annotation. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; + * @param \Google\Cloud\DocumentAI\V1\Document\Provenance $var + * @return $this + * @deprecated + */ + public function setProvenance($var) + { + @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Provenance::class); + $this->provenance = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/DetectedBarcode.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/DetectedBarcode.php new file mode 100644 index 000000000000..5c1d620a7725 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/DetectedBarcode.php @@ -0,0 +1,129 @@ +google.cloud.documentai.v1.Document.Page.DetectedBarcode + */ +class DetectedBarcode extends \Google\Protobuf\Internal\Message +{ + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; + */ + protected $layout = null; + /** + * Detailed barcode information of the + * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Barcode barcode = 2; + */ + protected $barcode = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. + * @type \Google\Cloud\DocumentAI\V1\Barcode $barcode + * Detailed barcode information of the + * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; + * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null + */ + public function getLayout() + { + return $this->layout; + } + + public function hasLayout() + { + return isset($this->layout); + } + + public function clearLayout() + { + unset($this->layout); + } + + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var + * @return $this + */ + public function setLayout($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Layout::class); + $this->layout = $var; + + return $this; + } + + /** + * Detailed barcode information of the + * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Barcode barcode = 2; + * @return \Google\Cloud\DocumentAI\V1\Barcode|null + */ + public function getBarcode() + { + return $this->barcode; + } + + public function hasBarcode() + { + return isset($this->barcode); + } + + public function clearBarcode() + { + unset($this->barcode); + } + + /** + * Detailed barcode information of the + * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Barcode barcode = 2; + * @param \Google\Cloud\DocumentAI\V1\Barcode $var + * @return $this + */ + public function setBarcode($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Barcode::class); + $this->barcode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/DetectedLanguage.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/DetectedLanguage.php new file mode 100644 index 000000000000..ac08ad3ba446 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/DetectedLanguage.php @@ -0,0 +1,109 @@ +google.cloud.documentai.v1.Document.Page.DetectedLanguage + */ +class DetectedLanguage extends \Google\Protobuf\Internal\Message +{ + /** + * The [BCP-47 language + * code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), + * such as `en-US` or `sr-Latn`. + * + * Generated from protobuf field string language_code = 1; + */ + protected $language_code = ''; + /** + * Confidence of detected language. Range `[0, 1]`. + * + * Generated from protobuf field float confidence = 2; + */ + protected $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $language_code + * The [BCP-47 language + * code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), + * such as `en-US` or `sr-Latn`. + * @type float $confidence + * Confidence of detected language. Range `[0, 1]`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * The [BCP-47 language + * code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), + * such as `en-US` or `sr-Latn`. + * + * Generated from protobuf field string language_code = 1; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The [BCP-47 language + * code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), + * such as `en-US` or `sr-Latn`. + * + * Generated from protobuf field string language_code = 1; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * Confidence of detected language. Range `[0, 1]`. + * + * Generated from protobuf field float confidence = 2; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * Confidence of detected language. Range `[0, 1]`. + * + * Generated from protobuf field float confidence = 2; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Dimension.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Dimension.php new file mode 100644 index 000000000000..cd7bddb6bdad --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Dimension.php @@ -0,0 +1,135 @@ +google.cloud.documentai.v1.Document.Page.Dimension + */ +class Dimension extends \Google\Protobuf\Internal\Message +{ + /** + * Page width. + * + * Generated from protobuf field float width = 1; + */ + protected $width = 0.0; + /** + * Page height. + * + * Generated from protobuf field float height = 2; + */ + protected $height = 0.0; + /** + * Dimension unit. + * + * Generated from protobuf field string unit = 3; + */ + protected $unit = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $width + * Page width. + * @type float $height + * Page height. + * @type string $unit + * Dimension unit. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Page width. + * + * Generated from protobuf field float width = 1; + * @return float + */ + public function getWidth() + { + return $this->width; + } + + /** + * Page width. + * + * Generated from protobuf field float width = 1; + * @param float $var + * @return $this + */ + public function setWidth($var) + { + GPBUtil::checkFloat($var); + $this->width = $var; + + return $this; + } + + /** + * Page height. + * + * Generated from protobuf field float height = 2; + * @return float + */ + public function getHeight() + { + return $this->height; + } + + /** + * Page height. + * + * Generated from protobuf field float height = 2; + * @param float $var + * @return $this + */ + public function setHeight($var) + { + GPBUtil::checkFloat($var); + $this->height = $var; + + return $this; + } + + /** + * Dimension unit. + * + * Generated from protobuf field string unit = 3; + * @return string + */ + public function getUnit() + { + return $this->unit; + } + + /** + * Dimension unit. + * + * Generated from protobuf field string unit = 3; + * @param string $var + * @return $this + */ + public function setUnit($var) + { + GPBUtil::checkString($var, True); + $this->unit = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/FormField.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/FormField.php new file mode 100644 index 000000000000..4f52cc2af82b --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/FormField.php @@ -0,0 +1,379 @@ +google.cloud.documentai.v1.Document.Page.FormField + */ +class FormField extends \Google\Protobuf\Internal\Message +{ + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the + * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. + * For example, `Address`, `Email`, `Grand total`, `Phone number`, etc. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout field_name = 1; + */ + protected $field_name = null; + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the + * [FormField][google.cloud.documentai.v1.Document.Page.FormField] value. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout field_value = 2; + */ + protected $field_value = null; + /** + * A list of detected languages for name together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage name_detected_languages = 3; + */ + private $name_detected_languages; + /** + * A list of detected languages for value together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage value_detected_languages = 4; + */ + private $value_detected_languages; + /** + * If the value is non-textual, this field represents the type. Current + * valid values are: + * - blank (this indicates the `field_value` is normal text) + * - `unfilled_checkbox` + * - `filled_checkbox` + * + * Generated from protobuf field string value_type = 5; + */ + protected $value_type = ''; + /** + * Created for Labeling UI to export key text. + * If corrections were made to the text identified by the + * `field_name.text_anchor`, this field will contain the correction. + * + * Generated from protobuf field string corrected_key_text = 6; + */ + protected $corrected_key_text = ''; + /** + * Created for Labeling UI to export value text. + * If corrections were made to the text identified by the + * `field_value.text_anchor`, this field will contain the correction. + * + * Generated from protobuf field string corrected_value_text = 7; + */ + protected $corrected_value_text = ''; + /** + * The history of this annotation. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 8; + */ + protected $provenance = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $field_name + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the + * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. + * For example, `Address`, `Email`, `Grand total`, `Phone number`, etc. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $field_value + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the + * [FormField][google.cloud.documentai.v1.Document.Page.FormField] value. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $name_detected_languages + * A list of detected languages for name together with confidence. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $value_detected_languages + * A list of detected languages for value together with confidence. + * @type string $value_type + * If the value is non-textual, this field represents the type. Current + * valid values are: + * - blank (this indicates the `field_value` is normal text) + * - `unfilled_checkbox` + * - `filled_checkbox` + * @type string $corrected_key_text + * Created for Labeling UI to export key text. + * If corrections were made to the text identified by the + * `field_name.text_anchor`, this field will contain the correction. + * @type string $corrected_value_text + * Created for Labeling UI to export value text. + * If corrections were made to the text identified by the + * `field_value.text_anchor`, this field will contain the correction. + * @type \Google\Cloud\DocumentAI\V1\Document\Provenance $provenance + * The history of this annotation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the + * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. + * For example, `Address`, `Email`, `Grand total`, `Phone number`, etc. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout field_name = 1; + * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null + */ + public function getFieldName() + { + return $this->field_name; + } + + public function hasFieldName() + { + return isset($this->field_name); + } + + public function clearFieldName() + { + unset($this->field_name); + } + + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the + * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. + * For example, `Address`, `Email`, `Grand total`, `Phone number`, etc. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout field_name = 1; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var + * @return $this + */ + public function setFieldName($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Layout::class); + $this->field_name = $var; + + return $this; + } + + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the + * [FormField][google.cloud.documentai.v1.Document.Page.FormField] value. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout field_value = 2; + * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null + */ + public function getFieldValue() + { + return $this->field_value; + } + + public function hasFieldValue() + { + return isset($this->field_value); + } + + public function clearFieldValue() + { + unset($this->field_value); + } + + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the + * [FormField][google.cloud.documentai.v1.Document.Page.FormField] value. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout field_value = 2; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var + * @return $this + */ + public function setFieldValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Layout::class); + $this->field_value = $var; + + return $this; + } + + /** + * A list of detected languages for name together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage name_detected_languages = 3; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage> + */ + public function getNameDetectedLanguages() + { + return $this->name_detected_languages; + } + + /** + * A list of detected languages for name together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage name_detected_languages = 3; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $var + * @return $this + */ + public function setNameDetectedLanguages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage::class); + $this->name_detected_languages = $arr; + + return $this; + } + + /** + * A list of detected languages for value together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage value_detected_languages = 4; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage> + */ + public function getValueDetectedLanguages() + { + return $this->value_detected_languages; + } + + /** + * A list of detected languages for value together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage value_detected_languages = 4; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $var + * @return $this + */ + public function setValueDetectedLanguages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage::class); + $this->value_detected_languages = $arr; + + return $this; + } + + /** + * If the value is non-textual, this field represents the type. Current + * valid values are: + * - blank (this indicates the `field_value` is normal text) + * - `unfilled_checkbox` + * - `filled_checkbox` + * + * Generated from protobuf field string value_type = 5; + * @return string + */ + public function getValueType() + { + return $this->value_type; + } + + /** + * If the value is non-textual, this field represents the type. Current + * valid values are: + * - blank (this indicates the `field_value` is normal text) + * - `unfilled_checkbox` + * - `filled_checkbox` + * + * Generated from protobuf field string value_type = 5; + * @param string $var + * @return $this + */ + public function setValueType($var) + { + GPBUtil::checkString($var, True); + $this->value_type = $var; + + return $this; + } + + /** + * Created for Labeling UI to export key text. + * If corrections were made to the text identified by the + * `field_name.text_anchor`, this field will contain the correction. + * + * Generated from protobuf field string corrected_key_text = 6; + * @return string + */ + public function getCorrectedKeyText() + { + return $this->corrected_key_text; + } + + /** + * Created for Labeling UI to export key text. + * If corrections were made to the text identified by the + * `field_name.text_anchor`, this field will contain the correction. + * + * Generated from protobuf field string corrected_key_text = 6; + * @param string $var + * @return $this + */ + public function setCorrectedKeyText($var) + { + GPBUtil::checkString($var, True); + $this->corrected_key_text = $var; + + return $this; + } + + /** + * Created for Labeling UI to export value text. + * If corrections were made to the text identified by the + * `field_value.text_anchor`, this field will contain the correction. + * + * Generated from protobuf field string corrected_value_text = 7; + * @return string + */ + public function getCorrectedValueText() + { + return $this->corrected_value_text; + } + + /** + * Created for Labeling UI to export value text. + * If corrections were made to the text identified by the + * `field_value.text_anchor`, this field will contain the correction. + * + * Generated from protobuf field string corrected_value_text = 7; + * @param string $var + * @return $this + */ + public function setCorrectedValueText($var) + { + GPBUtil::checkString($var, True); + $this->corrected_value_text = $var; + + return $this; + } + + /** + * The history of this annotation. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 8; + * @return \Google\Cloud\DocumentAI\V1\Document\Provenance|null + */ + public function getProvenance() + { + return $this->provenance; + } + + public function hasProvenance() + { + return isset($this->provenance); + } + + public function clearProvenance() + { + unset($this->provenance); + } + + /** + * The history of this annotation. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 8; + * @param \Google\Cloud\DocumentAI\V1\Document\Provenance $var + * @return $this + */ + public function setProvenance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Provenance::class); + $this->provenance = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Image.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Image.php new file mode 100644 index 000000000000..a5e49f2e15d9 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Image.php @@ -0,0 +1,177 @@ +google.cloud.documentai.v1.Document.Page.Image + */ +class Image extends \Google\Protobuf\Internal\Message +{ + /** + * Raw byte content of the image. + * + * Generated from protobuf field bytes content = 1; + */ + protected $content = ''; + /** + * Encoding [media type (MIME + * type)](https://www.iana.org/assignments/media-types/media-types.xhtml) + * for the image. + * + * Generated from protobuf field string mime_type = 2; + */ + protected $mime_type = ''; + /** + * Width of the image in pixels. + * + * Generated from protobuf field int32 width = 3; + */ + protected $width = 0; + /** + * Height of the image in pixels. + * + * Generated from protobuf field int32 height = 4; + */ + protected $height = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $content + * Raw byte content of the image. + * @type string $mime_type + * Encoding [media type (MIME + * type)](https://www.iana.org/assignments/media-types/media-types.xhtml) + * for the image. + * @type int $width + * Width of the image in pixels. + * @type int $height + * Height of the image in pixels. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Raw byte content of the image. + * + * Generated from protobuf field bytes content = 1; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Raw byte content of the image. + * + * Generated from protobuf field bytes content = 1; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, False); + $this->content = $var; + + return $this; + } + + /** + * Encoding [media type (MIME + * type)](https://www.iana.org/assignments/media-types/media-types.xhtml) + * for the image. + * + * Generated from protobuf field string mime_type = 2; + * @return string + */ + public function getMimeType() + { + return $this->mime_type; + } + + /** + * Encoding [media type (MIME + * type)](https://www.iana.org/assignments/media-types/media-types.xhtml) + * for the image. + * + * Generated from protobuf field string mime_type = 2; + * @param string $var + * @return $this + */ + public function setMimeType($var) + { + GPBUtil::checkString($var, True); + $this->mime_type = $var; + + return $this; + } + + /** + * Width of the image in pixels. + * + * Generated from protobuf field int32 width = 3; + * @return int + */ + public function getWidth() + { + return $this->width; + } + + /** + * Width of the image in pixels. + * + * Generated from protobuf field int32 width = 3; + * @param int $var + * @return $this + */ + public function setWidth($var) + { + GPBUtil::checkInt32($var); + $this->width = $var; + + return $this; + } + + /** + * Height of the image in pixels. + * + * Generated from protobuf field int32 height = 4; + * @return int + */ + public function getHeight() + { + return $this->height; + } + + /** + * Height of the image in pixels. + * + * Generated from protobuf field int32 height = 4; + * @param int $var + * @return $this + */ + public function setHeight($var) + { + GPBUtil::checkInt32($var); + $this->height = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/ImageQualityScores.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/ImageQualityScores.php new file mode 100644 index 000000000000..4023dbbb303c --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/ImageQualityScores.php @@ -0,0 +1,101 @@ +google.cloud.documentai.v1.Document.Page.ImageQualityScores + */ +class ImageQualityScores extends \Google\Protobuf\Internal\Message +{ + /** + * The overall quality score. Range `[0, 1]` where `1` is perfect quality. + * + * Generated from protobuf field float quality_score = 1; + */ + protected $quality_score = 0.0; + /** + * A list of detected defects. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + */ + private $detected_defects; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $quality_score + * The overall quality score. Range `[0, 1]` where `1` is perfect quality. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\ImageQualityScores\DetectedDefect[] $detected_defects + * A list of detected defects. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * The overall quality score. Range `[0, 1]` where `1` is perfect quality. + * + * Generated from protobuf field float quality_score = 1; + * @return float + */ + public function getQualityScore() + { + return $this->quality_score; + } + + /** + * The overall quality score. Range `[0, 1]` where `1` is perfect quality. + * + * Generated from protobuf field float quality_score = 1; + * @param float $var + * @return $this + */ + public function setQualityScore($var) + { + GPBUtil::checkFloat($var); + $this->quality_score = $var; + + return $this; + } + + /** + * A list of detected defects. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\ImageQualityScores\DetectedDefect> + */ + public function getDetectedDefects() + { + return $this->detected_defects; + } + + /** + * A list of detected defects. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\ImageQualityScores\DetectedDefect[] $var + * @return $this + */ + public function setDetectedDefects($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\ImageQualityScores\DetectedDefect::class); + $this->detected_defects = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/ImageQualityScores/DetectedDefect.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/ImageQualityScores/DetectedDefect.php new file mode 100644 index 000000000000..140bbcfb220e --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/ImageQualityScores/DetectedDefect.php @@ -0,0 +1,137 @@ +google.cloud.documentai.v1.Document.Page.ImageQualityScores.DetectedDefect + */ +class DetectedDefect extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the defect type. Supported values are: + * - `quality/defect_blurry` + * - `quality/defect_noisy` + * - `quality/defect_dark` + * - `quality/defect_faint` + * - `quality/defect_text_too_small` + * - `quality/defect_document_cutoff` + * - `quality/defect_text_cutoff` + * - `quality/defect_glare` + * + * Generated from protobuf field string type = 1; + */ + protected $type = ''; + /** + * Confidence of detected defect. Range `[0, 1]` where `1` indicates + * strong confidence that the defect exists. + * + * Generated from protobuf field float confidence = 2; + */ + protected $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $type + * Name of the defect type. Supported values are: + * - `quality/defect_blurry` + * - `quality/defect_noisy` + * - `quality/defect_dark` + * - `quality/defect_faint` + * - `quality/defect_text_too_small` + * - `quality/defect_document_cutoff` + * - `quality/defect_text_cutoff` + * - `quality/defect_glare` + * @type float $confidence + * Confidence of detected defect. Range `[0, 1]` where `1` indicates + * strong confidence that the defect exists. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Name of the defect type. Supported values are: + * - `quality/defect_blurry` + * - `quality/defect_noisy` + * - `quality/defect_dark` + * - `quality/defect_faint` + * - `quality/defect_text_too_small` + * - `quality/defect_document_cutoff` + * - `quality/defect_text_cutoff` + * - `quality/defect_glare` + * + * Generated from protobuf field string type = 1; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Name of the defect type. Supported values are: + * - `quality/defect_blurry` + * - `quality/defect_noisy` + * - `quality/defect_dark` + * - `quality/defect_faint` + * - `quality/defect_text_too_small` + * - `quality/defect_document_cutoff` + * - `quality/defect_text_cutoff` + * - `quality/defect_glare` + * + * Generated from protobuf field string type = 1; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * Confidence of detected defect. Range `[0, 1]` where `1` indicates + * strong confidence that the defect exists. + * + * Generated from protobuf field float confidence = 2; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * Confidence of detected defect. Range `[0, 1]` where `1` indicates + * strong confidence that the defect exists. + * + * Generated from protobuf field float confidence = 2; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Layout.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Layout.php new file mode 100644 index 000000000000..ad78411be810 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Layout.php @@ -0,0 +1,217 @@ +google.cloud.documentai.v1.Document.Page.Layout + */ +class Layout extends \Google\Protobuf\Internal\Message +{ + /** + * Text anchor indexing into the + * [Document.text][google.cloud.documentai.v1.Document.text]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; + */ + protected $text_anchor = null; + /** + * Confidence of the current + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] within + * context of the object this layout is for. For example, confidence can + * be for a single token, a table, a visual element, etc. depending on + * context. Range `[0, 1]`. + * + * Generated from protobuf field float confidence = 2; + */ + protected $confidence = 0.0; + /** + * The bounding polygon for the + * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. + * + * Generated from protobuf field .google.cloud.documentai.v1.BoundingPoly bounding_poly = 3; + */ + protected $bounding_poly = null; + /** + * Detected orientation for the + * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout.Orientation orientation = 4; + */ + protected $orientation = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document\TextAnchor $text_anchor + * Text anchor indexing into the + * [Document.text][google.cloud.documentai.v1.Document.text]. + * @type float $confidence + * Confidence of the current + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] within + * context of the object this layout is for. For example, confidence can + * be for a single token, a table, a visual element, etc. depending on + * context. Range `[0, 1]`. + * @type \Google\Cloud\DocumentAI\V1\BoundingPoly $bounding_poly + * The bounding polygon for the + * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. + * @type int $orientation + * Detected orientation for the + * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Text anchor indexing into the + * [Document.text][google.cloud.documentai.v1.Document.text]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; + * @return \Google\Cloud\DocumentAI\V1\Document\TextAnchor|null + */ + public function getTextAnchor() + { + return $this->text_anchor; + } + + public function hasTextAnchor() + { + return isset($this->text_anchor); + } + + public function clearTextAnchor() + { + unset($this->text_anchor); + } + + /** + * Text anchor indexing into the + * [Document.text][google.cloud.documentai.v1.Document.text]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; + * @param \Google\Cloud\DocumentAI\V1\Document\TextAnchor $var + * @return $this + */ + public function setTextAnchor($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\TextAnchor::class); + $this->text_anchor = $var; + + return $this; + } + + /** + * Confidence of the current + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] within + * context of the object this layout is for. For example, confidence can + * be for a single token, a table, a visual element, etc. depending on + * context. Range `[0, 1]`. + * + * Generated from protobuf field float confidence = 2; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * Confidence of the current + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] within + * context of the object this layout is for. For example, confidence can + * be for a single token, a table, a visual element, etc. depending on + * context. Range `[0, 1]`. + * + * Generated from protobuf field float confidence = 2; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + + /** + * The bounding polygon for the + * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. + * + * Generated from protobuf field .google.cloud.documentai.v1.BoundingPoly bounding_poly = 3; + * @return \Google\Cloud\DocumentAI\V1\BoundingPoly|null + */ + public function getBoundingPoly() + { + return $this->bounding_poly; + } + + public function hasBoundingPoly() + { + return isset($this->bounding_poly); + } + + public function clearBoundingPoly() + { + unset($this->bounding_poly); + } + + /** + * The bounding polygon for the + * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. + * + * Generated from protobuf field .google.cloud.documentai.v1.BoundingPoly bounding_poly = 3; + * @param \Google\Cloud\DocumentAI\V1\BoundingPoly $var + * @return $this + */ + public function setBoundingPoly($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\BoundingPoly::class); + $this->bounding_poly = $var; + + return $this; + } + + /** + * Detected orientation for the + * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout.Orientation orientation = 4; + * @return int + */ + public function getOrientation() + { + return $this->orientation; + } + + /** + * Detected orientation for the + * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout.Orientation orientation = 4; + * @param int $var + * @return $this + */ + public function setOrientation($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\Document\Page\Layout\Orientation::class); + $this->orientation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Layout/Orientation.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Layout/Orientation.php new file mode 100644 index 000000000000..2bd4b26107da --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Layout/Orientation.php @@ -0,0 +1,78 @@ +google.cloud.documentai.v1.Document.Page.Layout.Orientation + */ +class Orientation +{ + /** + * Unspecified orientation. + * + * Generated from protobuf enum ORIENTATION_UNSPECIFIED = 0; + */ + const ORIENTATION_UNSPECIFIED = 0; + /** + * Orientation is aligned with page up. + * + * Generated from protobuf enum PAGE_UP = 1; + */ + const PAGE_UP = 1; + /** + * Orientation is aligned with page right. + * Turn the head 90 degrees clockwise from upright to read. + * + * Generated from protobuf enum PAGE_RIGHT = 2; + */ + const PAGE_RIGHT = 2; + /** + * Orientation is aligned with page down. + * Turn the head 180 degrees from upright to read. + * + * Generated from protobuf enum PAGE_DOWN = 3; + */ + const PAGE_DOWN = 3; + /** + * Orientation is aligned with page left. + * Turn the head 90 degrees counterclockwise from upright to read. + * + * Generated from protobuf enum PAGE_LEFT = 4; + */ + const PAGE_LEFT = 4; + + private static $valueToName = [ + self::ORIENTATION_UNSPECIFIED => 'ORIENTATION_UNSPECIFIED', + self::PAGE_UP => 'PAGE_UP', + self::PAGE_RIGHT => 'PAGE_RIGHT', + self::PAGE_DOWN => 'PAGE_DOWN', + self::PAGE_LEFT => 'PAGE_LEFT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Line.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Line.php new file mode 100644 index 000000000000..6b72b04f81b7 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Line.php @@ -0,0 +1,171 @@ +google.cloud.documentai.v1.Document.Page.Line + */ +class Line extends \Google\Protobuf\Internal\Message +{ + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [Line][google.cloud.documentai.v1.Document.Page.Line]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; + */ + protected $layout = null; + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 2; + */ + private $detected_languages; + /** + * The history of this annotation. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; + * @deprecated + */ + protected $provenance = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [Line][google.cloud.documentai.v1.Document.Page.Line]. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $detected_languages + * A list of detected languages together with confidence. + * @type \Google\Cloud\DocumentAI\V1\Document\Provenance $provenance + * The history of this annotation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [Line][google.cloud.documentai.v1.Document.Page.Line]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; + * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null + */ + public function getLayout() + { + return $this->layout; + } + + public function hasLayout() + { + return isset($this->layout); + } + + public function clearLayout() + { + unset($this->layout); + } + + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [Line][google.cloud.documentai.v1.Document.Page.Line]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var + * @return $this + */ + public function setLayout($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Layout::class); + $this->layout = $var; + + return $this; + } + + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 2; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage> + */ + public function getDetectedLanguages() + { + return $this->detected_languages; + } + + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 2; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $var + * @return $this + */ + public function setDetectedLanguages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage::class); + $this->detected_languages = $arr; + + return $this; + } + + /** + * The history of this annotation. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; + * @return \Google\Cloud\DocumentAI\V1\Document\Provenance|null + * @deprecated + */ + public function getProvenance() + { + if (isset($this->provenance)) { + @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); + } + return $this->provenance; + } + + public function hasProvenance() + { + if (isset($this->provenance)) { + @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); + } + return isset($this->provenance); + } + + public function clearProvenance() + { + @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); + unset($this->provenance); + } + + /** + * The history of this annotation. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; + * @param \Google\Cloud\DocumentAI\V1\Document\Provenance $var + * @return $this + * @deprecated + */ + public function setProvenance($var) + { + @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Provenance::class); + $this->provenance = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Matrix.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Matrix.php new file mode 100644 index 000000000000..6a9d1afb0af2 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Matrix.php @@ -0,0 +1,182 @@ +google.cloud.documentai.v1.Document.Page.Matrix + */ +class Matrix extends \Google\Protobuf\Internal\Message +{ + /** + * Number of rows in the matrix. + * + * Generated from protobuf field int32 rows = 1; + */ + protected $rows = 0; + /** + * Number of columns in the matrix. + * + * Generated from protobuf field int32 cols = 2; + */ + protected $cols = 0; + /** + * This encodes information about what data type the matrix uses. + * For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list + * of OpenCV primitive data types, please refer to + * https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html + * + * Generated from protobuf field int32 type = 3; + */ + protected $type = 0; + /** + * The matrix data. + * + * Generated from protobuf field bytes data = 4; + */ + protected $data = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $rows + * Number of rows in the matrix. + * @type int $cols + * Number of columns in the matrix. + * @type int $type + * This encodes information about what data type the matrix uses. + * For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list + * of OpenCV primitive data types, please refer to + * https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html + * @type string $data + * The matrix data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Number of rows in the matrix. + * + * Generated from protobuf field int32 rows = 1; + * @return int + */ + public function getRows() + { + return $this->rows; + } + + /** + * Number of rows in the matrix. + * + * Generated from protobuf field int32 rows = 1; + * @param int $var + * @return $this + */ + public function setRows($var) + { + GPBUtil::checkInt32($var); + $this->rows = $var; + + return $this; + } + + /** + * Number of columns in the matrix. + * + * Generated from protobuf field int32 cols = 2; + * @return int + */ + public function getCols() + { + return $this->cols; + } + + /** + * Number of columns in the matrix. + * + * Generated from protobuf field int32 cols = 2; + * @param int $var + * @return $this + */ + public function setCols($var) + { + GPBUtil::checkInt32($var); + $this->cols = $var; + + return $this; + } + + /** + * This encodes information about what data type the matrix uses. + * For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list + * of OpenCV primitive data types, please refer to + * https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html + * + * Generated from protobuf field int32 type = 3; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * This encodes information about what data type the matrix uses. + * For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list + * of OpenCV primitive data types, please refer to + * https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html + * + * Generated from protobuf field int32 type = 3; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkInt32($var); + $this->type = $var; + + return $this; + } + + /** + * The matrix data. + * + * Generated from protobuf field bytes data = 4; + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * The matrix data. + * + * Generated from protobuf field bytes data = 4; + * @param string $var + * @return $this + */ + public function setData($var) + { + GPBUtil::checkString($var, False); + $this->data = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Paragraph.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Paragraph.php new file mode 100644 index 000000000000..f5b43941a26c --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Paragraph.php @@ -0,0 +1,170 @@ +google.cloud.documentai.v1.Document.Page.Paragraph + */ +class Paragraph extends \Google\Protobuf\Internal\Message +{ + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [Paragraph][google.cloud.documentai.v1.Document.Page.Paragraph]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; + */ + protected $layout = null; + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 2; + */ + private $detected_languages; + /** + * The history of this annotation. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; + * @deprecated + */ + protected $provenance = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [Paragraph][google.cloud.documentai.v1.Document.Page.Paragraph]. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $detected_languages + * A list of detected languages together with confidence. + * @type \Google\Cloud\DocumentAI\V1\Document\Provenance $provenance + * The history of this annotation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [Paragraph][google.cloud.documentai.v1.Document.Page.Paragraph]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; + * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null + */ + public function getLayout() + { + return $this->layout; + } + + public function hasLayout() + { + return isset($this->layout); + } + + public function clearLayout() + { + unset($this->layout); + } + + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [Paragraph][google.cloud.documentai.v1.Document.Page.Paragraph]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var + * @return $this + */ + public function setLayout($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Layout::class); + $this->layout = $var; + + return $this; + } + + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 2; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage> + */ + public function getDetectedLanguages() + { + return $this->detected_languages; + } + + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 2; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $var + * @return $this + */ + public function setDetectedLanguages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage::class); + $this->detected_languages = $arr; + + return $this; + } + + /** + * The history of this annotation. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; + * @return \Google\Cloud\DocumentAI\V1\Document\Provenance|null + * @deprecated + */ + public function getProvenance() + { + if (isset($this->provenance)) { + @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); + } + return $this->provenance; + } + + public function hasProvenance() + { + if (isset($this->provenance)) { + @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); + } + return isset($this->provenance); + } + + public function clearProvenance() + { + @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); + unset($this->provenance); + } + + /** + * The history of this annotation. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; + * @param \Google\Cloud\DocumentAI\V1\Document\Provenance $var + * @return $this + * @deprecated + */ + public function setProvenance($var) + { + @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Provenance::class); + $this->provenance = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Symbol.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Symbol.php new file mode 100644 index 000000000000..2216e83330ca --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Symbol.php @@ -0,0 +1,115 @@ +google.cloud.documentai.v1.Document.Page.Symbol + */ +class Symbol extends \Google\Protobuf\Internal\Message +{ + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [Symbol][google.cloud.documentai.v1.Document.Page.Symbol]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; + */ + protected $layout = null; + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 2; + */ + private $detected_languages; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [Symbol][google.cloud.documentai.v1.Document.Page.Symbol]. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $detected_languages + * A list of detected languages together with confidence. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [Symbol][google.cloud.documentai.v1.Document.Page.Symbol]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; + * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null + */ + public function getLayout() + { + return $this->layout; + } + + public function hasLayout() + { + return isset($this->layout); + } + + public function clearLayout() + { + unset($this->layout); + } + + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [Symbol][google.cloud.documentai.v1.Document.Page.Symbol]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var + * @return $this + */ + public function setLayout($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Layout::class); + $this->layout = $var; + + return $this; + } + + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 2; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage> + */ + public function getDetectedLanguages() + { + return $this->detected_languages; + } + + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 2; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $var + * @return $this + */ + public function setDetectedLanguages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage::class); + $this->detected_languages = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Table.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Table.php new file mode 100644 index 000000000000..a15ec94d9e91 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Table.php @@ -0,0 +1,238 @@ +google.cloud.documentai.v1.Document.Page.Table + */ +class Table extends \Google\Protobuf\Internal\Message +{ + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [Table][google.cloud.documentai.v1.Document.Page.Table]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; + */ + protected $layout = null; + /** + * Header rows of the table. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Table.TableRow header_rows = 2; + */ + private $header_rows; + /** + * Body rows of the table. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Table.TableRow body_rows = 3; + */ + private $body_rows; + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 4; + */ + private $detected_languages; + /** + * The history of this table. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 5 [deprecated = true]; + * @deprecated + */ + protected $provenance = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [Table][google.cloud.documentai.v1.Document.Page.Table]. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\Table\TableRow[] $header_rows + * Header rows of the table. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\Table\TableRow[] $body_rows + * Body rows of the table. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $detected_languages + * A list of detected languages together with confidence. + * @type \Google\Cloud\DocumentAI\V1\Document\Provenance $provenance + * The history of this table. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [Table][google.cloud.documentai.v1.Document.Page.Table]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; + * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null + */ + public function getLayout() + { + return $this->layout; + } + + public function hasLayout() + { + return isset($this->layout); + } + + public function clearLayout() + { + unset($this->layout); + } + + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [Table][google.cloud.documentai.v1.Document.Page.Table]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var + * @return $this + */ + public function setLayout($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Layout::class); + $this->layout = $var; + + return $this; + } + + /** + * Header rows of the table. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Table.TableRow header_rows = 2; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\Table\TableRow> + */ + public function getHeaderRows() + { + return $this->header_rows; + } + + /** + * Header rows of the table. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Table.TableRow header_rows = 2; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\Table\TableRow[] $var + * @return $this + */ + public function setHeaderRows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\Table\TableRow::class); + $this->header_rows = $arr; + + return $this; + } + + /** + * Body rows of the table. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Table.TableRow body_rows = 3; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\Table\TableRow> + */ + public function getBodyRows() + { + return $this->body_rows; + } + + /** + * Body rows of the table. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Table.TableRow body_rows = 3; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\Table\TableRow[] $var + * @return $this + */ + public function setBodyRows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\Table\TableRow::class); + $this->body_rows = $arr; + + return $this; + } + + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 4; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage> + */ + public function getDetectedLanguages() + { + return $this->detected_languages; + } + + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 4; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $var + * @return $this + */ + public function setDetectedLanguages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage::class); + $this->detected_languages = $arr; + + return $this; + } + + /** + * The history of this table. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 5 [deprecated = true]; + * @return \Google\Cloud\DocumentAI\V1\Document\Provenance|null + * @deprecated + */ + public function getProvenance() + { + if (isset($this->provenance)) { + @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); + } + return $this->provenance; + } + + public function hasProvenance() + { + if (isset($this->provenance)) { + @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); + } + return isset($this->provenance); + } + + public function clearProvenance() + { + @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); + unset($this->provenance); + } + + /** + * The history of this table. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 5 [deprecated = true]; + * @param \Google\Cloud\DocumentAI\V1\Document\Provenance $var + * @return $this + * @deprecated + */ + public function setProvenance($var) + { + @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Provenance::class); + $this->provenance = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Table/TableCell.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Table/TableCell.php new file mode 100644 index 000000000000..b595f6f00ec3 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Table/TableCell.php @@ -0,0 +1,183 @@ +google.cloud.documentai.v1.Document.Page.Table.TableCell + */ +class TableCell extends \Google\Protobuf\Internal\Message +{ + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [TableCell][google.cloud.documentai.v1.Document.Page.Table.TableCell]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; + */ + protected $layout = null; + /** + * How many rows this cell spans. + * + * Generated from protobuf field int32 row_span = 2; + */ + protected $row_span = 0; + /** + * How many columns this cell spans. + * + * Generated from protobuf field int32 col_span = 3; + */ + protected $col_span = 0; + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 4; + */ + private $detected_languages; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [TableCell][google.cloud.documentai.v1.Document.Page.Table.TableCell]. + * @type int $row_span + * How many rows this cell spans. + * @type int $col_span + * How many columns this cell spans. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $detected_languages + * A list of detected languages together with confidence. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [TableCell][google.cloud.documentai.v1.Document.Page.Table.TableCell]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; + * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null + */ + public function getLayout() + { + return $this->layout; + } + + public function hasLayout() + { + return isset($this->layout); + } + + public function clearLayout() + { + unset($this->layout); + } + + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [TableCell][google.cloud.documentai.v1.Document.Page.Table.TableCell]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var + * @return $this + */ + public function setLayout($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Layout::class); + $this->layout = $var; + + return $this; + } + + /** + * How many rows this cell spans. + * + * Generated from protobuf field int32 row_span = 2; + * @return int + */ + public function getRowSpan() + { + return $this->row_span; + } + + /** + * How many rows this cell spans. + * + * Generated from protobuf field int32 row_span = 2; + * @param int $var + * @return $this + */ + public function setRowSpan($var) + { + GPBUtil::checkInt32($var); + $this->row_span = $var; + + return $this; + } + + /** + * How many columns this cell spans. + * + * Generated from protobuf field int32 col_span = 3; + * @return int + */ + public function getColSpan() + { + return $this->col_span; + } + + /** + * How many columns this cell spans. + * + * Generated from protobuf field int32 col_span = 3; + * @param int $var + * @return $this + */ + public function setColSpan($var) + { + GPBUtil::checkInt32($var); + $this->col_span = $var; + + return $this; + } + + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 4; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage> + */ + public function getDetectedLanguages() + { + return $this->detected_languages; + } + + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 4; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $var + * @return $this + */ + public function setDetectedLanguages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage::class); + $this->detected_languages = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Table/TableRow.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Table/TableRow.php new file mode 100644 index 000000000000..4b978d57ab7e --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Table/TableRow.php @@ -0,0 +1,67 @@ +google.cloud.documentai.v1.Document.Page.Table.TableRow + */ +class TableRow extends \Google\Protobuf\Internal\Message +{ + /** + * Cells that make up this row. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Table.TableCell cells = 1; + */ + private $cells; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document\Page\Table\TableCell[] $cells + * Cells that make up this row. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Cells that make up this row. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Table.TableCell cells = 1; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\Table\TableCell> + */ + public function getCells() + { + return $this->cells; + } + + /** + * Cells that make up this row. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Table.TableCell cells = 1; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\Table\TableCell[] $var + * @return $this + */ + public function setCells($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\Table\TableCell::class); + $this->cells = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token.php new file mode 100644 index 000000000000..a2c9f5e1d290 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token.php @@ -0,0 +1,262 @@ +google.cloud.documentai.v1.Document.Page.Token + */ +class Token extends \Google\Protobuf\Internal\Message +{ + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [Token][google.cloud.documentai.v1.Document.Page.Token]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; + */ + protected $layout = null; + /** + * Detected break at the end of a + * [Token][google.cloud.documentai.v1.Document.Page.Token]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Token.DetectedBreak detected_break = 2; + */ + protected $detected_break = null; + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 3; + */ + private $detected_languages; + /** + * The history of this annotation. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 4 [deprecated = true]; + * @deprecated + */ + protected $provenance = null; + /** + * Text style attributes. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Token.StyleInfo style_info = 5; + */ + protected $style_info = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [Token][google.cloud.documentai.v1.Document.Page.Token]. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\Token\DetectedBreak $detected_break + * Detected break at the end of a + * [Token][google.cloud.documentai.v1.Document.Page.Token]. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $detected_languages + * A list of detected languages together with confidence. + * @type \Google\Cloud\DocumentAI\V1\Document\Provenance $provenance + * The history of this annotation. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\Token\StyleInfo $style_info + * Text style attributes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [Token][google.cloud.documentai.v1.Document.Page.Token]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; + * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null + */ + public function getLayout() + { + return $this->layout; + } + + public function hasLayout() + { + return isset($this->layout); + } + + public function clearLayout() + { + unset($this->layout); + } + + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [Token][google.cloud.documentai.v1.Document.Page.Token]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var + * @return $this + */ + public function setLayout($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Layout::class); + $this->layout = $var; + + return $this; + } + + /** + * Detected break at the end of a + * [Token][google.cloud.documentai.v1.Document.Page.Token]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Token.DetectedBreak detected_break = 2; + * @return \Google\Cloud\DocumentAI\V1\Document\Page\Token\DetectedBreak|null + */ + public function getDetectedBreak() + { + return $this->detected_break; + } + + public function hasDetectedBreak() + { + return isset($this->detected_break); + } + + public function clearDetectedBreak() + { + unset($this->detected_break); + } + + /** + * Detected break at the end of a + * [Token][google.cloud.documentai.v1.Document.Page.Token]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Token.DetectedBreak detected_break = 2; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\Token\DetectedBreak $var + * @return $this + */ + public function setDetectedBreak($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Token\DetectedBreak::class); + $this->detected_break = $var; + + return $this; + } + + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 3; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage> + */ + public function getDetectedLanguages() + { + return $this->detected_languages; + } + + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 3; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $var + * @return $this + */ + public function setDetectedLanguages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage::class); + $this->detected_languages = $arr; + + return $this; + } + + /** + * The history of this annotation. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 4 [deprecated = true]; + * @return \Google\Cloud\DocumentAI\V1\Document\Provenance|null + * @deprecated + */ + public function getProvenance() + { + if (isset($this->provenance)) { + @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); + } + return $this->provenance; + } + + public function hasProvenance() + { + if (isset($this->provenance)) { + @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); + } + return isset($this->provenance); + } + + public function clearProvenance() + { + @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); + unset($this->provenance); + } + + /** + * The history of this annotation. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 4 [deprecated = true]; + * @param \Google\Cloud\DocumentAI\V1\Document\Provenance $var + * @return $this + * @deprecated + */ + public function setProvenance($var) + { + @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Provenance::class); + $this->provenance = $var; + + return $this; + } + + /** + * Text style attributes. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Token.StyleInfo style_info = 5; + * @return \Google\Cloud\DocumentAI\V1\Document\Page\Token\StyleInfo|null + */ + public function getStyleInfo() + { + return $this->style_info; + } + + public function hasStyleInfo() + { + return isset($this->style_info); + } + + public function clearStyleInfo() + { + unset($this->style_info); + } + + /** + * Text style attributes. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Token.StyleInfo style_info = 5; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\Token\StyleInfo $var + * @return $this + */ + public function setStyleInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Token\StyleInfo::class); + $this->style_info = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token/DetectedBreak.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token/DetectedBreak.php new file mode 100644 index 000000000000..f1bb4fb29dc0 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token/DetectedBreak.php @@ -0,0 +1,68 @@ +google.cloud.documentai.v1.Document.Page.Token.DetectedBreak + */ +class DetectedBreak extends \Google\Protobuf\Internal\Message +{ + /** + * Detected break type. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Token.DetectedBreak.Type type = 1; + */ + protected $type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Detected break type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Detected break type. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Token.DetectedBreak.Type type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Detected break type. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Token.DetectedBreak.Type type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\Document\Page\Token\DetectedBreak\Type::class); + $this->type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token/DetectedBreak/Type.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token/DetectedBreak/Type.php new file mode 100644 index 000000000000..c536ad1b6e11 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token/DetectedBreak/Type.php @@ -0,0 +1,68 @@ +google.cloud.documentai.v1.Document.Page.Token.DetectedBreak.Type + */ +class Type +{ + /** + * Unspecified break type. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * A single whitespace. + * + * Generated from protobuf enum SPACE = 1; + */ + const SPACE = 1; + /** + * A wider whitespace. + * + * Generated from protobuf enum WIDE_SPACE = 2; + */ + const WIDE_SPACE = 2; + /** + * A hyphen that indicates that a token has been split across lines. + * + * Generated from protobuf enum HYPHEN = 3; + */ + const HYPHEN = 3; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::SPACE => 'SPACE', + self::WIDE_SPACE => 'WIDE_SPACE', + self::HYPHEN => 'HYPHEN', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token/StyleInfo.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token/StyleInfo.php new file mode 100644 index 000000000000..c3ed9461ebb3 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token/StyleInfo.php @@ -0,0 +1,583 @@ +google.cloud.documentai.v1.Document.Page.Token.StyleInfo + */ +class StyleInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Font size in points (`1` point is `¹⁄₇₂` inches). + * + * Generated from protobuf field int32 font_size = 1; + */ + protected $font_size = 0; + /** + * Font size in pixels, equal to _unrounded + * [font_size][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_size]_ + * * _resolution_ ÷ `72.0`. + * + * Generated from protobuf field double pixel_font_size = 2; + */ + protected $pixel_font_size = 0.0; + /** + * Letter spacing in points. + * + * Generated from protobuf field double letter_spacing = 3; + */ + protected $letter_spacing = 0.0; + /** + * Name or style of the font. + * + * Generated from protobuf field string font_type = 4; + */ + protected $font_type = ''; + /** + * Whether the text is bold (equivalent to + * [font_weight][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_weight] + * is at least `700`). + * + * Generated from protobuf field bool bold = 5; + */ + protected $bold = false; + /** + * Whether the text is italic. + * + * Generated from protobuf field bool italic = 6; + */ + protected $italic = false; + /** + * Whether the text is underlined. + * + * Generated from protobuf field bool underlined = 7; + */ + protected $underlined = false; + /** + * Whether the text is strikethrough. This feature is not supported yet. + * + * Generated from protobuf field bool strikeout = 8; + */ + protected $strikeout = false; + /** + * Whether the text is a subscript. This feature is not supported yet. + * + * Generated from protobuf field bool subscript = 9; + */ + protected $subscript = false; + /** + * Whether the text is a superscript. This feature is not supported yet. + * + * Generated from protobuf field bool superscript = 10; + */ + protected $superscript = false; + /** + * Whether the text is in small caps. This feature is not supported yet. + * + * Generated from protobuf field bool smallcaps = 11; + */ + protected $smallcaps = false; + /** + * TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). + * Normal is `400`, bold is `700`. + * + * Generated from protobuf field int32 font_weight = 12; + */ + protected $font_weight = 0; + /** + * Whether the text is handwritten. + * + * Generated from protobuf field bool handwritten = 13; + */ + protected $handwritten = false; + /** + * Color of the text. + * + * Generated from protobuf field .google.type.Color text_color = 14; + */ + protected $text_color = null; + /** + * Color of the background. + * + * Generated from protobuf field .google.type.Color background_color = 15; + */ + protected $background_color = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $font_size + * Font size in points (`1` point is `¹⁄₇₂` inches). + * @type float $pixel_font_size + * Font size in pixels, equal to _unrounded + * [font_size][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_size]_ + * * _resolution_ ÷ `72.0`. + * @type float $letter_spacing + * Letter spacing in points. + * @type string $font_type + * Name or style of the font. + * @type bool $bold + * Whether the text is bold (equivalent to + * [font_weight][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_weight] + * is at least `700`). + * @type bool $italic + * Whether the text is italic. + * @type bool $underlined + * Whether the text is underlined. + * @type bool $strikeout + * Whether the text is strikethrough. This feature is not supported yet. + * @type bool $subscript + * Whether the text is a subscript. This feature is not supported yet. + * @type bool $superscript + * Whether the text is a superscript. This feature is not supported yet. + * @type bool $smallcaps + * Whether the text is in small caps. This feature is not supported yet. + * @type int $font_weight + * TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). + * Normal is `400`, bold is `700`. + * @type bool $handwritten + * Whether the text is handwritten. + * @type \Google\Type\Color $text_color + * Color of the text. + * @type \Google\Type\Color $background_color + * Color of the background. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Font size in points (`1` point is `¹⁄₇₂` inches). + * + * Generated from protobuf field int32 font_size = 1; + * @return int + */ + public function getFontSize() + { + return $this->font_size; + } + + /** + * Font size in points (`1` point is `¹⁄₇₂` inches). + * + * Generated from protobuf field int32 font_size = 1; + * @param int $var + * @return $this + */ + public function setFontSize($var) + { + GPBUtil::checkInt32($var); + $this->font_size = $var; + + return $this; + } + + /** + * Font size in pixels, equal to _unrounded + * [font_size][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_size]_ + * * _resolution_ ÷ `72.0`. + * + * Generated from protobuf field double pixel_font_size = 2; + * @return float + */ + public function getPixelFontSize() + { + return $this->pixel_font_size; + } + + /** + * Font size in pixels, equal to _unrounded + * [font_size][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_size]_ + * * _resolution_ ÷ `72.0`. + * + * Generated from protobuf field double pixel_font_size = 2; + * @param float $var + * @return $this + */ + public function setPixelFontSize($var) + { + GPBUtil::checkDouble($var); + $this->pixel_font_size = $var; + + return $this; + } + + /** + * Letter spacing in points. + * + * Generated from protobuf field double letter_spacing = 3; + * @return float + */ + public function getLetterSpacing() + { + return $this->letter_spacing; + } + + /** + * Letter spacing in points. + * + * Generated from protobuf field double letter_spacing = 3; + * @param float $var + * @return $this + */ + public function setLetterSpacing($var) + { + GPBUtil::checkDouble($var); + $this->letter_spacing = $var; + + return $this; + } + + /** + * Name or style of the font. + * + * Generated from protobuf field string font_type = 4; + * @return string + */ + public function getFontType() + { + return $this->font_type; + } + + /** + * Name or style of the font. + * + * Generated from protobuf field string font_type = 4; + * @param string $var + * @return $this + */ + public function setFontType($var) + { + GPBUtil::checkString($var, True); + $this->font_type = $var; + + return $this; + } + + /** + * Whether the text is bold (equivalent to + * [font_weight][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_weight] + * is at least `700`). + * + * Generated from protobuf field bool bold = 5; + * @return bool + */ + public function getBold() + { + return $this->bold; + } + + /** + * Whether the text is bold (equivalent to + * [font_weight][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_weight] + * is at least `700`). + * + * Generated from protobuf field bool bold = 5; + * @param bool $var + * @return $this + */ + public function setBold($var) + { + GPBUtil::checkBool($var); + $this->bold = $var; + + return $this; + } + + /** + * Whether the text is italic. + * + * Generated from protobuf field bool italic = 6; + * @return bool + */ + public function getItalic() + { + return $this->italic; + } + + /** + * Whether the text is italic. + * + * Generated from protobuf field bool italic = 6; + * @param bool $var + * @return $this + */ + public function setItalic($var) + { + GPBUtil::checkBool($var); + $this->italic = $var; + + return $this; + } + + /** + * Whether the text is underlined. + * + * Generated from protobuf field bool underlined = 7; + * @return bool + */ + public function getUnderlined() + { + return $this->underlined; + } + + /** + * Whether the text is underlined. + * + * Generated from protobuf field bool underlined = 7; + * @param bool $var + * @return $this + */ + public function setUnderlined($var) + { + GPBUtil::checkBool($var); + $this->underlined = $var; + + return $this; + } + + /** + * Whether the text is strikethrough. This feature is not supported yet. + * + * Generated from protobuf field bool strikeout = 8; + * @return bool + */ + public function getStrikeout() + { + return $this->strikeout; + } + + /** + * Whether the text is strikethrough. This feature is not supported yet. + * + * Generated from protobuf field bool strikeout = 8; + * @param bool $var + * @return $this + */ + public function setStrikeout($var) + { + GPBUtil::checkBool($var); + $this->strikeout = $var; + + return $this; + } + + /** + * Whether the text is a subscript. This feature is not supported yet. + * + * Generated from protobuf field bool subscript = 9; + * @return bool + */ + public function getSubscript() + { + return $this->subscript; + } + + /** + * Whether the text is a subscript. This feature is not supported yet. + * + * Generated from protobuf field bool subscript = 9; + * @param bool $var + * @return $this + */ + public function setSubscript($var) + { + GPBUtil::checkBool($var); + $this->subscript = $var; + + return $this; + } + + /** + * Whether the text is a superscript. This feature is not supported yet. + * + * Generated from protobuf field bool superscript = 10; + * @return bool + */ + public function getSuperscript() + { + return $this->superscript; + } + + /** + * Whether the text is a superscript. This feature is not supported yet. + * + * Generated from protobuf field bool superscript = 10; + * @param bool $var + * @return $this + */ + public function setSuperscript($var) + { + GPBUtil::checkBool($var); + $this->superscript = $var; + + return $this; + } + + /** + * Whether the text is in small caps. This feature is not supported yet. + * + * Generated from protobuf field bool smallcaps = 11; + * @return bool + */ + public function getSmallcaps() + { + return $this->smallcaps; + } + + /** + * Whether the text is in small caps. This feature is not supported yet. + * + * Generated from protobuf field bool smallcaps = 11; + * @param bool $var + * @return $this + */ + public function setSmallcaps($var) + { + GPBUtil::checkBool($var); + $this->smallcaps = $var; + + return $this; + } + + /** + * TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). + * Normal is `400`, bold is `700`. + * + * Generated from protobuf field int32 font_weight = 12; + * @return int + */ + public function getFontWeight() + { + return $this->font_weight; + } + + /** + * TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). + * Normal is `400`, bold is `700`. + * + * Generated from protobuf field int32 font_weight = 12; + * @param int $var + * @return $this + */ + public function setFontWeight($var) + { + GPBUtil::checkInt32($var); + $this->font_weight = $var; + + return $this; + } + + /** + * Whether the text is handwritten. + * + * Generated from protobuf field bool handwritten = 13; + * @return bool + */ + public function getHandwritten() + { + return $this->handwritten; + } + + /** + * Whether the text is handwritten. + * + * Generated from protobuf field bool handwritten = 13; + * @param bool $var + * @return $this + */ + public function setHandwritten($var) + { + GPBUtil::checkBool($var); + $this->handwritten = $var; + + return $this; + } + + /** + * Color of the text. + * + * Generated from protobuf field .google.type.Color text_color = 14; + * @return \Google\Type\Color|null + */ + public function getTextColor() + { + return $this->text_color; + } + + public function hasTextColor() + { + return isset($this->text_color); + } + + public function clearTextColor() + { + unset($this->text_color); + } + + /** + * Color of the text. + * + * Generated from protobuf field .google.type.Color text_color = 14; + * @param \Google\Type\Color $var + * @return $this + */ + public function setTextColor($var) + { + GPBUtil::checkMessage($var, \Google\Type\Color::class); + $this->text_color = $var; + + return $this; + } + + /** + * Color of the background. + * + * Generated from protobuf field .google.type.Color background_color = 15; + * @return \Google\Type\Color|null + */ + public function getBackgroundColor() + { + return $this->background_color; + } + + public function hasBackgroundColor() + { + return isset($this->background_color); + } + + public function clearBackgroundColor() + { + unset($this->background_color); + } + + /** + * Color of the background. + * + * Generated from protobuf field .google.type.Color background_color = 15; + * @param \Google\Type\Color $var + * @return $this + */ + public function setBackgroundColor($var) + { + GPBUtil::checkMessage($var, \Google\Type\Color::class); + $this->background_color = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/VisualElement.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/VisualElement.php new file mode 100644 index 000000000000..ead412d26c3a --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/VisualElement.php @@ -0,0 +1,154 @@ +google.cloud.documentai.v1.Document.Page.VisualElement + */ +class VisualElement extends \Google\Protobuf\Internal\Message +{ + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; + */ + protected $layout = null; + /** + * Type of the + * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. + * + * Generated from protobuf field string type = 2; + */ + protected $type = ''; + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 3; + */ + private $detected_languages; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. + * @type string $type + * Type of the + * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. + * @type \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $detected_languages + * A list of detected languages together with confidence. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; + * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null + */ + public function getLayout() + { + return $this->layout; + } + + public function hasLayout() + { + return isset($this->layout); + } + + public function clearLayout() + { + unset($this->layout); + } + + /** + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for + * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var + * @return $this + */ + public function setLayout($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Layout::class); + $this->layout = $var; + + return $this; + } + + /** + * Type of the + * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. + * + * Generated from protobuf field string type = 2; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Type of the + * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. + * + * Generated from protobuf field string type = 2; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 3; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage> + */ + public function getDetectedLanguages() + { + return $this->detected_languages; + } + + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 3; + * @param \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $var + * @return $this + */ + public function setDetectedLanguages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage::class); + $this->detected_languages = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/PageAnchor.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/PageAnchor.php new file mode 100644 index 000000000000..08c07c1f2a3a --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/PageAnchor.php @@ -0,0 +1,70 @@ +google.cloud.documentai.v1.Document.PageAnchor + */ +class PageAnchor extends \Google\Protobuf\Internal\Message +{ + /** + * One or more references to visual page elements + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.PageAnchor.PageRef page_refs = 1; + */ + private $page_refs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document\PageAnchor\PageRef[] $page_refs + * One or more references to visual page elements + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * One or more references to visual page elements + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.PageAnchor.PageRef page_refs = 1; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\PageAnchor\PageRef> + */ + public function getPageRefs() + { + return $this->page_refs; + } + + /** + * One or more references to visual page elements + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.PageAnchor.PageRef page_refs = 1; + * @param \Google\Cloud\DocumentAI\V1\Document\PageAnchor\PageRef[] $var + * @return $this + */ + public function setPageRefs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\PageAnchor\PageRef::class); + $this->page_refs = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/PageAnchor/PageRef.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/PageAnchor/PageRef.php new file mode 100644 index 000000000000..240a39c2151e --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/PageAnchor/PageRef.php @@ -0,0 +1,264 @@ +google.cloud.documentai.v1.Document.PageAnchor.PageRef + */ +class PageRef extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Index into the + * [Document.pages][google.cloud.documentai.v1.Document.pages] element, + * for example using + * `[Document.pages][page_refs.page]` to locate the related page element. + * This field is skipped when its value is the default `0`. See + * https://developers.google.com/protocol-buffers/docs/proto3#json. + * + * Generated from protobuf field int64 page = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $page = 0; + /** + * Optional. The type of the layout element that is being referenced if + * any. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.PageAnchor.PageRef.LayoutType layout_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $layout_type = 0; + /** + * Optional. Deprecated. Use + * [PageRef.bounding_poly][google.cloud.documentai.v1.Document.PageAnchor.PageRef.bounding_poly] + * instead. + * + * Generated from protobuf field string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @deprecated + */ + protected $layout_id = ''; + /** + * Optional. Identifies the bounding polygon of a layout element on the + * page. If `layout_type` is set, the bounding polygon must be exactly the + * same to the layout element it's referring to. + * + * Generated from protobuf field .google.cloud.documentai.v1.BoundingPoly bounding_poly = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $bounding_poly = null; + /** + * Optional. Confidence of detected page element, if applicable. Range + * `[0, 1]`. + * + * Generated from protobuf field float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $page + * Required. Index into the + * [Document.pages][google.cloud.documentai.v1.Document.pages] element, + * for example using + * `[Document.pages][page_refs.page]` to locate the related page element. + * This field is skipped when its value is the default `0`. See + * https://developers.google.com/protocol-buffers/docs/proto3#json. + * @type int $layout_type + * Optional. The type of the layout element that is being referenced if + * any. + * @type string $layout_id + * Optional. Deprecated. Use + * [PageRef.bounding_poly][google.cloud.documentai.v1.Document.PageAnchor.PageRef.bounding_poly] + * instead. + * @type \Google\Cloud\DocumentAI\V1\BoundingPoly $bounding_poly + * Optional. Identifies the bounding polygon of a layout element on the + * page. If `layout_type` is set, the bounding polygon must be exactly the + * same to the layout element it's referring to. + * @type float $confidence + * Optional. Confidence of detected page element, if applicable. Range + * `[0, 1]`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Required. Index into the + * [Document.pages][google.cloud.documentai.v1.Document.pages] element, + * for example using + * `[Document.pages][page_refs.page]` to locate the related page element. + * This field is skipped when its value is the default `0`. See + * https://developers.google.com/protocol-buffers/docs/proto3#json. + * + * Generated from protobuf field int64 page = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int|string + */ + public function getPage() + { + return $this->page; + } + + /** + * Required. Index into the + * [Document.pages][google.cloud.documentai.v1.Document.pages] element, + * for example using + * `[Document.pages][page_refs.page]` to locate the related page element. + * This field is skipped when its value is the default `0`. See + * https://developers.google.com/protocol-buffers/docs/proto3#json. + * + * Generated from protobuf field int64 page = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int|string $var + * @return $this + */ + public function setPage($var) + { + GPBUtil::checkInt64($var); + $this->page = $var; + + return $this; + } + + /** + * Optional. The type of the layout element that is being referenced if + * any. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.PageAnchor.PageRef.LayoutType layout_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getLayoutType() + { + return $this->layout_type; + } + + /** + * Optional. The type of the layout element that is being referenced if + * any. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.PageAnchor.PageRef.LayoutType layout_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setLayoutType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\Document\PageAnchor\PageRef\LayoutType::class); + $this->layout_type = $var; + + return $this; + } + + /** + * Optional. Deprecated. Use + * [PageRef.bounding_poly][google.cloud.documentai.v1.Document.PageAnchor.PageRef.bounding_poly] + * instead. + * + * Generated from protobuf field string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @return string + * @deprecated + */ + public function getLayoutId() + { + if ($this->layout_id !== '') { + @trigger_error('layout_id is deprecated.', E_USER_DEPRECATED); + } + return $this->layout_id; + } + + /** + * Optional. Deprecated. Use + * [PageRef.bounding_poly][google.cloud.documentai.v1.Document.PageAnchor.PageRef.bounding_poly] + * instead. + * + * Generated from protobuf field string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + * @deprecated + */ + public function setLayoutId($var) + { + @trigger_error('layout_id is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->layout_id = $var; + + return $this; + } + + /** + * Optional. Identifies the bounding polygon of a layout element on the + * page. If `layout_type` is set, the bounding polygon must be exactly the + * same to the layout element it's referring to. + * + * Generated from protobuf field .google.cloud.documentai.v1.BoundingPoly bounding_poly = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\DocumentAI\V1\BoundingPoly|null + */ + public function getBoundingPoly() + { + return $this->bounding_poly; + } + + public function hasBoundingPoly() + { + return isset($this->bounding_poly); + } + + public function clearBoundingPoly() + { + unset($this->bounding_poly); + } + + /** + * Optional. Identifies the bounding polygon of a layout element on the + * page. If `layout_type` is set, the bounding polygon must be exactly the + * same to the layout element it's referring to. + * + * Generated from protobuf field .google.cloud.documentai.v1.BoundingPoly bounding_poly = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\DocumentAI\V1\BoundingPoly $var + * @return $this + */ + public function setBoundingPoly($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\BoundingPoly::class); + $this->bounding_poly = $var; + + return $this; + } + + /** + * Optional. Confidence of detected page element, if applicable. Range + * `[0, 1]`. + * + * Generated from protobuf field float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * Optional. Confidence of detected page element, if applicable. Range + * `[0, 1]`. + * + * Generated from protobuf field float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/PageAnchor/PageRef/LayoutType.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/PageAnchor/PageRef/LayoutType.php new file mode 100644 index 000000000000..b98beb7e6e5f --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/PageAnchor/PageRef/LayoutType.php @@ -0,0 +1,109 @@ +google.cloud.documentai.v1.Document.PageAnchor.PageRef.LayoutType + */ +class LayoutType +{ + /** + * Layout Unspecified. + * + * Generated from protobuf enum LAYOUT_TYPE_UNSPECIFIED = 0; + */ + const LAYOUT_TYPE_UNSPECIFIED = 0; + /** + * References a + * [Page.blocks][google.cloud.documentai.v1.Document.Page.blocks] + * element. + * + * Generated from protobuf enum BLOCK = 1; + */ + const BLOCK = 1; + /** + * References a + * [Page.paragraphs][google.cloud.documentai.v1.Document.Page.paragraphs] + * element. + * + * Generated from protobuf enum PARAGRAPH = 2; + */ + const PARAGRAPH = 2; + /** + * References a + * [Page.lines][google.cloud.documentai.v1.Document.Page.lines] element. + * + * Generated from protobuf enum LINE = 3; + */ + const LINE = 3; + /** + * References a + * [Page.tokens][google.cloud.documentai.v1.Document.Page.tokens] + * element. + * + * Generated from protobuf enum TOKEN = 4; + */ + const TOKEN = 4; + /** + * References a + * [Page.visual_elements][google.cloud.documentai.v1.Document.Page.visual_elements] + * element. + * + * Generated from protobuf enum VISUAL_ELEMENT = 5; + */ + const VISUAL_ELEMENT = 5; + /** + * Refrrences a + * [Page.tables][google.cloud.documentai.v1.Document.Page.tables] + * element. + * + * Generated from protobuf enum TABLE = 6; + */ + const TABLE = 6; + /** + * References a + * [Page.form_fields][google.cloud.documentai.v1.Document.Page.form_fields] + * element. + * + * Generated from protobuf enum FORM_FIELD = 7; + */ + const FORM_FIELD = 7; + + private static $valueToName = [ + self::LAYOUT_TYPE_UNSPECIFIED => 'LAYOUT_TYPE_UNSPECIFIED', + self::BLOCK => 'BLOCK', + self::PARAGRAPH => 'PARAGRAPH', + self::LINE => 'LINE', + self::TOKEN => 'TOKEN', + self::VISUAL_ELEMENT => 'VISUAL_ELEMENT', + self::TABLE => 'TABLE', + self::FORM_FIELD => 'FORM_FIELD', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Provenance.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Provenance.php new file mode 100644 index 000000000000..a8282aca2592 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Provenance.php @@ -0,0 +1,188 @@ +google.cloud.documentai.v1.Document.Provenance + */ +class Provenance extends \Google\Protobuf\Internal\Message +{ + /** + * The index of the revision that produced this element. + * + * Generated from protobuf field int32 revision = 1 [deprecated = true]; + * @deprecated + */ + protected $revision = 0; + /** + * The Id of this operation. Needs to be unique within the scope of the + * revision. + * + * Generated from protobuf field int32 id = 2 [deprecated = true]; + * @deprecated + */ + protected $id = 0; + /** + * References to the original elements that are replaced. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Provenance.Parent parents = 3; + */ + private $parents; + /** + * The type of provenance operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance.OperationType type = 4; + */ + protected $type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $revision + * The index of the revision that produced this element. + * @type int $id + * The Id of this operation. Needs to be unique within the scope of the + * revision. + * @type \Google\Cloud\DocumentAI\V1\Document\Provenance\PBParent[] $parents + * References to the original elements that are replaced. + * @type int $type + * The type of provenance operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * The index of the revision that produced this element. + * + * Generated from protobuf field int32 revision = 1 [deprecated = true]; + * @return int + * @deprecated + */ + public function getRevision() + { + if ($this->revision !== 0) { + @trigger_error('revision is deprecated.', E_USER_DEPRECATED); + } + return $this->revision; + } + + /** + * The index of the revision that produced this element. + * + * Generated from protobuf field int32 revision = 1 [deprecated = true]; + * @param int $var + * @return $this + * @deprecated + */ + public function setRevision($var) + { + @trigger_error('revision is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkInt32($var); + $this->revision = $var; + + return $this; + } + + /** + * The Id of this operation. Needs to be unique within the scope of the + * revision. + * + * Generated from protobuf field int32 id = 2 [deprecated = true]; + * @return int + * @deprecated + */ + public function getId() + { + if ($this->id !== 0) { + @trigger_error('id is deprecated.', E_USER_DEPRECATED); + } + return $this->id; + } + + /** + * The Id of this operation. Needs to be unique within the scope of the + * revision. + * + * Generated from protobuf field int32 id = 2 [deprecated = true]; + * @param int $var + * @return $this + * @deprecated + */ + public function setId($var) + { + @trigger_error('id is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkInt32($var); + $this->id = $var; + + return $this; + } + + /** + * References to the original elements that are replaced. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Provenance.Parent parents = 3; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Provenance\PBParent> + */ + public function getParents() + { + return $this->parents; + } + + /** + * References to the original elements that are replaced. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Provenance.Parent parents = 3; + * @param \Google\Cloud\DocumentAI\V1\Document\Provenance\PBParent[] $var + * @return $this + */ + public function setParents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Provenance\PBParent::class); + $this->parents = $arr; + + return $this; + } + + /** + * The type of provenance operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance.OperationType type = 4; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of provenance operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance.OperationType type = 4; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\Document\Provenance\OperationType::class); + $this->type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Provenance/OperationType.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Provenance/OperationType.php new file mode 100644 index 000000000000..b9cc53e04cc9 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Provenance/OperationType.php @@ -0,0 +1,102 @@ +google.cloud.documentai.v1.Document.Provenance.OperationType + */ +class OperationType +{ + /** + * Operation type unspecified. If no operation is specified a provenance + * entry is simply used to match against a `parent`. + * + * Generated from protobuf enum OPERATION_TYPE_UNSPECIFIED = 0; + */ + const OPERATION_TYPE_UNSPECIFIED = 0; + /** + * Add an element. + * + * Generated from protobuf enum ADD = 1; + */ + const ADD = 1; + /** + * Remove an element identified by `parent`. + * + * Generated from protobuf enum REMOVE = 2; + */ + const REMOVE = 2; + /** + * Updates any fields within the given provenance scope of the message. It + * overwrites the fields rather than replacing them. Use this when you + * want to update a field value of an entity without also updating all the + * child properties. + * + * Generated from protobuf enum UPDATE = 7; + */ + const UPDATE = 7; + /** + * Currently unused. Replace an element identified by `parent`. + * + * Generated from protobuf enum REPLACE = 3; + */ + const REPLACE = 3; + /** + * Deprecated. Request human review for the element identified by + * `parent`. + * + * Generated from protobuf enum EVAL_REQUESTED = 4 [deprecated = true]; + */ + const EVAL_REQUESTED = 4; + /** + * Deprecated. Element is reviewed and approved at human review, + * confidence will be set to 1.0. + * + * Generated from protobuf enum EVAL_APPROVED = 5 [deprecated = true]; + */ + const EVAL_APPROVED = 5; + /** + * Deprecated. Element is skipped in the validation process. + * + * Generated from protobuf enum EVAL_SKIPPED = 6 [deprecated = true]; + */ + const EVAL_SKIPPED = 6; + + private static $valueToName = [ + self::OPERATION_TYPE_UNSPECIFIED => 'OPERATION_TYPE_UNSPECIFIED', + self::ADD => 'ADD', + self::REMOVE => 'REMOVE', + self::UPDATE => 'UPDATE', + self::REPLACE => 'REPLACE', + self::EVAL_REQUESTED => 'EVAL_REQUESTED', + self::EVAL_APPROVED => 'EVAL_APPROVED', + self::EVAL_SKIPPED => 'EVAL_SKIPPED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Provenance/PBParent.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Provenance/PBParent.php new file mode 100644 index 000000000000..b23fffae3132 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Provenance/PBParent.php @@ -0,0 +1,147 @@ +google.cloud.documentai.v1.Document.Provenance.Parent + */ +class PBParent extends \Google\Protobuf\Internal\Message +{ + /** + * The index of the index into current revision's parent_ids list. + * + * Generated from protobuf field int32 revision = 1; + */ + protected $revision = 0; + /** + * The index of the parent item in the corresponding item list (eg. list + * of entities, properties within entities, etc.) in the parent revision. + * + * Generated from protobuf field int32 index = 3; + */ + protected $index = 0; + /** + * The id of the parent provenance. + * + * Generated from protobuf field int32 id = 2 [deprecated = true]; + * @deprecated + */ + protected $id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $revision + * The index of the index into current revision's parent_ids list. + * @type int $index + * The index of the parent item in the corresponding item list (eg. list + * of entities, properties within entities, etc.) in the parent revision. + * @type int $id + * The id of the parent provenance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * The index of the index into current revision's parent_ids list. + * + * Generated from protobuf field int32 revision = 1; + * @return int + */ + public function getRevision() + { + return $this->revision; + } + + /** + * The index of the index into current revision's parent_ids list. + * + * Generated from protobuf field int32 revision = 1; + * @param int $var + * @return $this + */ + public function setRevision($var) + { + GPBUtil::checkInt32($var); + $this->revision = $var; + + return $this; + } + + /** + * The index of the parent item in the corresponding item list (eg. list + * of entities, properties within entities, etc.) in the parent revision. + * + * Generated from protobuf field int32 index = 3; + * @return int + */ + public function getIndex() + { + return $this->index; + } + + /** + * The index of the parent item in the corresponding item list (eg. list + * of entities, properties within entities, etc.) in the parent revision. + * + * Generated from protobuf field int32 index = 3; + * @param int $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkInt32($var); + $this->index = $var; + + return $this; + } + + /** + * The id of the parent provenance. + * + * Generated from protobuf field int32 id = 2 [deprecated = true]; + * @return int + * @deprecated + */ + public function getId() + { + if ($this->id !== 0) { + @trigger_error('id is deprecated.', E_USER_DEPRECATED); + } + return $this->id; + } + + /** + * The id of the parent provenance. + * + * Generated from protobuf field int32 id = 2 [deprecated = true]; + * @param int $var + * @return $this + * @deprecated + */ + public function setId($var) + { + @trigger_error('id is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkInt32($var); + $this->id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Revision.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Revision.php new file mode 100644 index 000000000000..e9767e3a5d3f --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Revision.php @@ -0,0 +1,337 @@ +google.cloud.documentai.v1.Document.Revision + */ +class Revision extends \Google\Protobuf\Internal\Message +{ + /** + * Id of the revision, internally generated by doc proto storage. + * Unique within the context of the document. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * The revisions that this revision is based on. This can include one or + * more parent (when documents are merged.) This field represents the + * index into the `revisions` field. + * + * Generated from protobuf field repeated int32 parent = 2 [deprecated = true]; + * @deprecated + */ + private $parent; + /** + * The revisions that this revision is based on. Must include all the ids + * that have anything to do with this revision - eg. there are + * `provenance.parent.revision` fields that index into this field. + * + * Generated from protobuf field repeated string parent_ids = 7; + */ + private $parent_ids; + /** + * The time that the revision was created, internally generated by + * doc proto storage at the time of create. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + */ + protected $create_time = null; + /** + * Human Review information of this revision. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Revision.HumanReview human_review = 6; + */ + protected $human_review = null; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $agent + * If the change was made by a person specify the name or id of that + * person. + * @type string $processor + * If the annotation was made by processor identify the processor by its + * resource name. + * @type string $id + * Id of the revision, internally generated by doc proto storage. + * Unique within the context of the document. + * @type int[] $parent + * The revisions that this revision is based on. This can include one or + * more parent (when documents are merged.) This field represents the + * index into the `revisions` field. + * @type string[] $parent_ids + * The revisions that this revision is based on. Must include all the ids + * that have anything to do with this revision - eg. there are + * `provenance.parent.revision` fields that index into this field. + * @type \Google\Protobuf\Timestamp $create_time + * The time that the revision was created, internally generated by + * doc proto storage at the time of create. + * @type \Google\Cloud\DocumentAI\V1\Document\Revision\HumanReview $human_review + * Human Review information of this revision. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * If the change was made by a person specify the name or id of that + * person. + * + * Generated from protobuf field string agent = 4; + * @return string + */ + public function getAgent() + { + return $this->readOneof(4); + } + + public function hasAgent() + { + return $this->hasOneof(4); + } + + /** + * If the change was made by a person specify the name or id of that + * person. + * + * Generated from protobuf field string agent = 4; + * @param string $var + * @return $this + */ + public function setAgent($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * If the annotation was made by processor identify the processor by its + * resource name. + * + * Generated from protobuf field string processor = 5; + * @return string + */ + public function getProcessor() + { + return $this->readOneof(5); + } + + public function hasProcessor() + { + return $this->hasOneof(5); + } + + /** + * If the annotation was made by processor identify the processor by its + * resource name. + * + * Generated from protobuf field string processor = 5; + * @param string $var + * @return $this + */ + public function setProcessor($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Id of the revision, internally generated by doc proto storage. + * Unique within the context of the document. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Id of the revision, internally generated by doc proto storage. + * Unique within the context of the document. + * + * Generated from protobuf field string id = 1; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * The revisions that this revision is based on. This can include one or + * more parent (when documents are merged.) This field represents the + * index into the `revisions` field. + * + * Generated from protobuf field repeated int32 parent = 2 [deprecated = true]; + * @return RepeatedField + * @deprecated + */ + public function getParent() + { + if ($this->parent->count() !== 0) { + @trigger_error('parent is deprecated.', E_USER_DEPRECATED); + } + return $this->parent; + } + + /** + * The revisions that this revision is based on. This can include one or + * more parent (when documents are merged.) This field represents the + * index into the `revisions` field. + * + * Generated from protobuf field repeated int32 parent = 2 [deprecated = true]; + * @param int[] $var + * @return $this + * @deprecated + */ + public function setParent($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + if ($arr->count() !== 0) { + @trigger_error('parent is deprecated.', E_USER_DEPRECATED); + } + $this->parent = $arr; + + return $this; + } + + /** + * The revisions that this revision is based on. Must include all the ids + * that have anything to do with this revision - eg. there are + * `provenance.parent.revision` fields that index into this field. + * + * Generated from protobuf field repeated string parent_ids = 7; + * @return RepeatedField + */ + public function getParentIds() + { + return $this->parent_ids; + } + + /** + * The revisions that this revision is based on. Must include all the ids + * that have anything to do with this revision - eg. there are + * `provenance.parent.revision` fields that index into this field. + * + * Generated from protobuf field repeated string parent_ids = 7; + * @param string[] $var + * @return $this + */ + public function setParentIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->parent_ids = $arr; + + return $this; + } + + /** + * The time that the revision was created, internally generated by + * doc proto storage at the time of create. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * The time that the revision was created, internally generated by + * doc proto storage at the time of create. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Human Review information of this revision. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Revision.HumanReview human_review = 6; + * @return \Google\Cloud\DocumentAI\V1\Document\Revision\HumanReview|null + */ + public function getHumanReview() + { + return $this->human_review; + } + + public function hasHumanReview() + { + return isset($this->human_review); + } + + public function clearHumanReview() + { + unset($this->human_review); + } + + /** + * Human Review information of this revision. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Revision.HumanReview human_review = 6; + * @param \Google\Cloud\DocumentAI\V1\Document\Revision\HumanReview $var + * @return $this + */ + public function setHumanReview($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Revision\HumanReview::class); + $this->human_review = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Revision/HumanReview.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Revision/HumanReview.php new file mode 100644 index 000000000000..5db9c95244cf --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Revision/HumanReview.php @@ -0,0 +1,105 @@ +google.cloud.documentai.v1.Document.Revision.HumanReview + */ +class HumanReview extends \Google\Protobuf\Internal\Message +{ + /** + * Human review state. For example, `requested`, `succeeded`, `rejected`. + * + * Generated from protobuf field string state = 1; + */ + protected $state = ''; + /** + * A message providing more details about the current state of processing. + * For example, the rejection reason when the state is `rejected`. + * + * Generated from protobuf field string state_message = 2; + */ + protected $state_message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $state + * Human review state. For example, `requested`, `succeeded`, `rejected`. + * @type string $state_message + * A message providing more details about the current state of processing. + * For example, the rejection reason when the state is `rejected`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Human review state. For example, `requested`, `succeeded`, `rejected`. + * + * Generated from protobuf field string state = 1; + * @return string + */ + public function getState() + { + return $this->state; + } + + /** + * Human review state. For example, `requested`, `succeeded`, `rejected`. + * + * Generated from protobuf field string state = 1; + * @param string $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkString($var, True); + $this->state = $var; + + return $this; + } + + /** + * A message providing more details about the current state of processing. + * For example, the rejection reason when the state is `rejected`. + * + * Generated from protobuf field string state_message = 2; + * @return string + */ + public function getStateMessage() + { + return $this->state_message; + } + + /** + * A message providing more details about the current state of processing. + * For example, the rejection reason when the state is `rejected`. + * + * Generated from protobuf field string state_message = 2; + * @param string $var + * @return $this + */ + public function setStateMessage($var) + { + GPBUtil::checkString($var, True); + $this->state_message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ShardInfo.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ShardInfo.php new file mode 100644 index 000000000000..1443552475ad --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ShardInfo.php @@ -0,0 +1,145 @@ +google.cloud.documentai.v1.Document.ShardInfo + */ +class ShardInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The 0-based index of this shard. + * + * Generated from protobuf field int64 shard_index = 1; + */ + protected $shard_index = 0; + /** + * Total number of shards. + * + * Generated from protobuf field int64 shard_count = 2; + */ + protected $shard_count = 0; + /** + * The index of the first character in + * [Document.text][google.cloud.documentai.v1.Document.text] in the overall + * document global text. + * + * Generated from protobuf field int64 text_offset = 3; + */ + protected $text_offset = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $shard_index + * The 0-based index of this shard. + * @type int|string $shard_count + * Total number of shards. + * @type int|string $text_offset + * The index of the first character in + * [Document.text][google.cloud.documentai.v1.Document.text] in the overall + * document global text. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * The 0-based index of this shard. + * + * Generated from protobuf field int64 shard_index = 1; + * @return int|string + */ + public function getShardIndex() + { + return $this->shard_index; + } + + /** + * The 0-based index of this shard. + * + * Generated from protobuf field int64 shard_index = 1; + * @param int|string $var + * @return $this + */ + public function setShardIndex($var) + { + GPBUtil::checkInt64($var); + $this->shard_index = $var; + + return $this; + } + + /** + * Total number of shards. + * + * Generated from protobuf field int64 shard_count = 2; + * @return int|string + */ + public function getShardCount() + { + return $this->shard_count; + } + + /** + * Total number of shards. + * + * Generated from protobuf field int64 shard_count = 2; + * @param int|string $var + * @return $this + */ + public function setShardCount($var) + { + GPBUtil::checkInt64($var); + $this->shard_count = $var; + + return $this; + } + + /** + * The index of the first character in + * [Document.text][google.cloud.documentai.v1.Document.text] in the overall + * document global text. + * + * Generated from protobuf field int64 text_offset = 3; + * @return int|string + */ + public function getTextOffset() + { + return $this->text_offset; + } + + /** + * The index of the first character in + * [Document.text][google.cloud.documentai.v1.Document.text] in the overall + * document global text. + * + * Generated from protobuf field int64 text_offset = 3; + * @param int|string $var + * @return $this + */ + public function setTextOffset($var) + { + GPBUtil::checkInt64($var); + $this->text_offset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Style.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Style.php new file mode 100644 index 000000000000..031f90761f05 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Style.php @@ -0,0 +1,374 @@ +google.cloud.documentai.v1.Document.Style + */ +class Style extends \Google\Protobuf\Internal\Message +{ + /** + * Text anchor indexing into the + * [Document.text][google.cloud.documentai.v1.Document.text]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; + */ + protected $text_anchor = null; + /** + * Text color. + * + * Generated from protobuf field .google.type.Color color = 2; + */ + protected $color = null; + /** + * Text background color. + * + * Generated from protobuf field .google.type.Color background_color = 3; + */ + protected $background_color = null; + /** + * [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). + * Possible values are `normal`, `bold`, `bolder`, and `lighter`. + * + * Generated from protobuf field string font_weight = 4; + */ + protected $font_weight = ''; + /** + * [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). + * Possible values are `normal`, `italic`, and `oblique`. + * + * Generated from protobuf field string text_style = 5; + */ + protected $text_style = ''; + /** + * [Text + * decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). + * Follows CSS standard. + * + * + * Generated from protobuf field string text_decoration = 6; + */ + protected $text_decoration = ''; + /** + * Font size. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Style.FontSize font_size = 7; + */ + protected $font_size = null; + /** + * Font family such as `Arial`, `Times New Roman`. + * https://www.w3schools.com/cssref/pr_font_font-family.asp + * + * Generated from protobuf field string font_family = 8; + */ + protected $font_family = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document\TextAnchor $text_anchor + * Text anchor indexing into the + * [Document.text][google.cloud.documentai.v1.Document.text]. + * @type \Google\Type\Color $color + * Text color. + * @type \Google\Type\Color $background_color + * Text background color. + * @type string $font_weight + * [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). + * Possible values are `normal`, `bold`, `bolder`, and `lighter`. + * @type string $text_style + * [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). + * Possible values are `normal`, `italic`, and `oblique`. + * @type string $text_decoration + * [Text + * decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). + * Follows CSS standard. + * + * @type \Google\Cloud\DocumentAI\V1\Document\Style\FontSize $font_size + * Font size. + * @type string $font_family + * Font family such as `Arial`, `Times New Roman`. + * https://www.w3schools.com/cssref/pr_font_font-family.asp + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Text anchor indexing into the + * [Document.text][google.cloud.documentai.v1.Document.text]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; + * @return \Google\Cloud\DocumentAI\V1\Document\TextAnchor|null + */ + public function getTextAnchor() + { + return $this->text_anchor; + } + + public function hasTextAnchor() + { + return isset($this->text_anchor); + } + + public function clearTextAnchor() + { + unset($this->text_anchor); + } + + /** + * Text anchor indexing into the + * [Document.text][google.cloud.documentai.v1.Document.text]. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; + * @param \Google\Cloud\DocumentAI\V1\Document\TextAnchor $var + * @return $this + */ + public function setTextAnchor($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\TextAnchor::class); + $this->text_anchor = $var; + + return $this; + } + + /** + * Text color. + * + * Generated from protobuf field .google.type.Color color = 2; + * @return \Google\Type\Color|null + */ + public function getColor() + { + return $this->color; + } + + public function hasColor() + { + return isset($this->color); + } + + public function clearColor() + { + unset($this->color); + } + + /** + * Text color. + * + * Generated from protobuf field .google.type.Color color = 2; + * @param \Google\Type\Color $var + * @return $this + */ + public function setColor($var) + { + GPBUtil::checkMessage($var, \Google\Type\Color::class); + $this->color = $var; + + return $this; + } + + /** + * Text background color. + * + * Generated from protobuf field .google.type.Color background_color = 3; + * @return \Google\Type\Color|null + */ + public function getBackgroundColor() + { + return $this->background_color; + } + + public function hasBackgroundColor() + { + return isset($this->background_color); + } + + public function clearBackgroundColor() + { + unset($this->background_color); + } + + /** + * Text background color. + * + * Generated from protobuf field .google.type.Color background_color = 3; + * @param \Google\Type\Color $var + * @return $this + */ + public function setBackgroundColor($var) + { + GPBUtil::checkMessage($var, \Google\Type\Color::class); + $this->background_color = $var; + + return $this; + } + + /** + * [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). + * Possible values are `normal`, `bold`, `bolder`, and `lighter`. + * + * Generated from protobuf field string font_weight = 4; + * @return string + */ + public function getFontWeight() + { + return $this->font_weight; + } + + /** + * [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). + * Possible values are `normal`, `bold`, `bolder`, and `lighter`. + * + * Generated from protobuf field string font_weight = 4; + * @param string $var + * @return $this + */ + public function setFontWeight($var) + { + GPBUtil::checkString($var, True); + $this->font_weight = $var; + + return $this; + } + + /** + * [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). + * Possible values are `normal`, `italic`, and `oblique`. + * + * Generated from protobuf field string text_style = 5; + * @return string + */ + public function getTextStyle() + { + return $this->text_style; + } + + /** + * [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). + * Possible values are `normal`, `italic`, and `oblique`. + * + * Generated from protobuf field string text_style = 5; + * @param string $var + * @return $this + */ + public function setTextStyle($var) + { + GPBUtil::checkString($var, True); + $this->text_style = $var; + + return $this; + } + + /** + * [Text + * decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). + * Follows CSS standard. + * + * + * Generated from protobuf field string text_decoration = 6; + * @return string + */ + public function getTextDecoration() + { + return $this->text_decoration; + } + + /** + * [Text + * decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). + * Follows CSS standard. + * + * + * Generated from protobuf field string text_decoration = 6; + * @param string $var + * @return $this + */ + public function setTextDecoration($var) + { + GPBUtil::checkString($var, True); + $this->text_decoration = $var; + + return $this; + } + + /** + * Font size. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Style.FontSize font_size = 7; + * @return \Google\Cloud\DocumentAI\V1\Document\Style\FontSize|null + */ + public function getFontSize() + { + return $this->font_size; + } + + public function hasFontSize() + { + return isset($this->font_size); + } + + public function clearFontSize() + { + unset($this->font_size); + } + + /** + * Font size. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Style.FontSize font_size = 7; + * @param \Google\Cloud\DocumentAI\V1\Document\Style\FontSize $var + * @return $this + */ + public function setFontSize($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Style\FontSize::class); + $this->font_size = $var; + + return $this; + } + + /** + * Font family such as `Arial`, `Times New Roman`. + * https://www.w3schools.com/cssref/pr_font_font-family.asp + * + * Generated from protobuf field string font_family = 8; + * @return string + */ + public function getFontFamily() + { + return $this->font_family; + } + + /** + * Font family such as `Arial`, `Times New Roman`. + * https://www.w3schools.com/cssref/pr_font_font-family.asp + * + * Generated from protobuf field string font_family = 8; + * @param string $var + * @return $this + */ + public function setFontFamily($var) + { + GPBUtil::checkString($var, True); + $this->font_family = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Style/FontSize.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Style/FontSize.php new file mode 100644 index 000000000000..8fa5998f8092 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Style/FontSize.php @@ -0,0 +1,105 @@ +google.cloud.documentai.v1.Document.Style.FontSize + */ +class FontSize extends \Google\Protobuf\Internal\Message +{ + /** + * Font size for the text. + * + * Generated from protobuf field float size = 1; + */ + protected $size = 0.0; + /** + * Unit for the font size. Follows CSS naming (such as `in`, `px`, and + * `pt`). + * + * Generated from protobuf field string unit = 2; + */ + protected $unit = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $size + * Font size for the text. + * @type string $unit + * Unit for the font size. Follows CSS naming (such as `in`, `px`, and + * `pt`). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Font size for the text. + * + * Generated from protobuf field float size = 1; + * @return float + */ + public function getSize() + { + return $this->size; + } + + /** + * Font size for the text. + * + * Generated from protobuf field float size = 1; + * @param float $var + * @return $this + */ + public function setSize($var) + { + GPBUtil::checkFloat($var); + $this->size = $var; + + return $this; + } + + /** + * Unit for the font size. Follows CSS naming (such as `in`, `px`, and + * `pt`). + * + * Generated from protobuf field string unit = 2; + * @return string + */ + public function getUnit() + { + return $this->unit; + } + + /** + * Unit for the font size. Follows CSS naming (such as `in`, `px`, and + * `pt`). + * + * Generated from protobuf field string unit = 2; + * @param string $var + * @return $this + */ + public function setUnit($var) + { + GPBUtil::checkString($var, True); + $this->unit = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/TextAnchor.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/TextAnchor.php new file mode 100644 index 000000000000..5e5f6d1d20dc --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/TextAnchor.php @@ -0,0 +1,114 @@ +google.cloud.documentai.v1.Document.TextAnchor + */ +class TextAnchor extends \Google\Protobuf\Internal\Message +{ + /** + * The text segments from the + * [Document.text][google.cloud.documentai.v1.Document.text]. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1; + */ + private $text_segments; + /** + * Contains the content of the text span so that users do + * not have to look it up in the text_segments. It is always + * populated for formFields. + * + * Generated from protobuf field string content = 2; + */ + protected $content = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document\TextAnchor\TextSegment[] $text_segments + * The text segments from the + * [Document.text][google.cloud.documentai.v1.Document.text]. + * @type string $content + * Contains the content of the text span so that users do + * not have to look it up in the text_segments. It is always + * populated for formFields. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * The text segments from the + * [Document.text][google.cloud.documentai.v1.Document.text]. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\TextAnchor\TextSegment> + */ + public function getTextSegments() + { + return $this->text_segments; + } + + /** + * The text segments from the + * [Document.text][google.cloud.documentai.v1.Document.text]. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1; + * @param \Google\Cloud\DocumentAI\V1\Document\TextAnchor\TextSegment[] $var + * @return $this + */ + public function setTextSegments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\TextAnchor\TextSegment::class); + $this->text_segments = $arr; + + return $this; + } + + /** + * Contains the content of the text span so that users do + * not have to look it up in the text_segments. It is always + * populated for formFields. + * + * Generated from protobuf field string content = 2; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Contains the content of the text span so that users do + * not have to look it up in the text_segments. It is always + * populated for formFields. + * + * Generated from protobuf field string content = 2; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, True); + $this->content = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/TextAnchor/TextSegment.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/TextAnchor/TextSegment.php new file mode 100644 index 000000000000..6f536b701cdb --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/TextAnchor/TextSegment.php @@ -0,0 +1,121 @@ +google.cloud.documentai.v1.Document.TextAnchor.TextSegment + */ +class TextSegment extends \Google\Protobuf\Internal\Message +{ + /** + * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] + * start UTF-8 char index in the + * [Document.text][google.cloud.documentai.v1.Document.text]. + * + * Generated from protobuf field int64 start_index = 1; + */ + protected $start_index = 0; + /** + * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] + * half open end UTF-8 char index in the + * [Document.text][google.cloud.documentai.v1.Document.text]. + * + * Generated from protobuf field int64 end_index = 2; + */ + protected $end_index = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $start_index + * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] + * start UTF-8 char index in the + * [Document.text][google.cloud.documentai.v1.Document.text]. + * @type int|string $end_index + * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] + * half open end UTF-8 char index in the + * [Document.text][google.cloud.documentai.v1.Document.text]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] + * start UTF-8 char index in the + * [Document.text][google.cloud.documentai.v1.Document.text]. + * + * Generated from protobuf field int64 start_index = 1; + * @return int|string + */ + public function getStartIndex() + { + return $this->start_index; + } + + /** + * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] + * start UTF-8 char index in the + * [Document.text][google.cloud.documentai.v1.Document.text]. + * + * Generated from protobuf field int64 start_index = 1; + * @param int|string $var + * @return $this + */ + public function setStartIndex($var) + { + GPBUtil::checkInt64($var); + $this->start_index = $var; + + return $this; + } + + /** + * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] + * half open end UTF-8 char index in the + * [Document.text][google.cloud.documentai.v1.Document.text]. + * + * Generated from protobuf field int64 end_index = 2; + * @return int|string + */ + public function getEndIndex() + { + return $this->end_index; + } + + /** + * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] + * half open end UTF-8 char index in the + * [Document.text][google.cloud.documentai.v1.Document.text]. + * + * Generated from protobuf field int64 end_index = 2; + * @param int|string $var + * @return $this + */ + public function setEndIndex($var) + { + GPBUtil::checkInt64($var); + $this->end_index = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/TextChange.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/TextChange.php new file mode 100644 index 000000000000..2a0286eb186c --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/TextChange.php @@ -0,0 +1,174 @@ +google.cloud.documentai.v1.Document.TextChange + */ +class TextChange extends \Google\Protobuf\Internal\Message +{ + /** + * Provenance of the correction. + * Text anchor indexing into the + * [Document.text][google.cloud.documentai.v1.Document.text]. There can + * only be a single `TextAnchor.text_segments` element. If the start and + * end index of the text segment are the same, the text change is inserted + * before that index. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; + */ + protected $text_anchor = null; + /** + * The text that replaces the text identified in the `text_anchor`. + * + * Generated from protobuf field string changed_text = 2; + */ + protected $changed_text = ''; + /** + * The history of this annotation. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; + * @deprecated + */ + private $provenance; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document\TextAnchor $text_anchor + * Provenance of the correction. + * Text anchor indexing into the + * [Document.text][google.cloud.documentai.v1.Document.text]. There can + * only be a single `TextAnchor.text_segments` element. If the start and + * end index of the text segment are the same, the text change is inserted + * before that index. + * @type string $changed_text + * The text that replaces the text identified in the `text_anchor`. + * @type \Google\Cloud\DocumentAI\V1\Document\Provenance[] $provenance + * The history of this annotation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Provenance of the correction. + * Text anchor indexing into the + * [Document.text][google.cloud.documentai.v1.Document.text]. There can + * only be a single `TextAnchor.text_segments` element. If the start and + * end index of the text segment are the same, the text change is inserted + * before that index. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; + * @return \Google\Cloud\DocumentAI\V1\Document\TextAnchor|null + */ + public function getTextAnchor() + { + return $this->text_anchor; + } + + public function hasTextAnchor() + { + return isset($this->text_anchor); + } + + public function clearTextAnchor() + { + unset($this->text_anchor); + } + + /** + * Provenance of the correction. + * Text anchor indexing into the + * [Document.text][google.cloud.documentai.v1.Document.text]. There can + * only be a single `TextAnchor.text_segments` element. If the start and + * end index of the text segment are the same, the text change is inserted + * before that index. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; + * @param \Google\Cloud\DocumentAI\V1\Document\TextAnchor $var + * @return $this + */ + public function setTextAnchor($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\TextAnchor::class); + $this->text_anchor = $var; + + return $this; + } + + /** + * The text that replaces the text identified in the `text_anchor`. + * + * Generated from protobuf field string changed_text = 2; + * @return string + */ + public function getChangedText() + { + return $this->changed_text; + } + + /** + * The text that replaces the text identified in the `text_anchor`. + * + * Generated from protobuf field string changed_text = 2; + * @param string $var + * @return $this + */ + public function setChangedText($var) + { + GPBUtil::checkString($var, True); + $this->changed_text = $var; + + return $this; + } + + /** + * The history of this annotation. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Provenance> + * @deprecated + */ + public function getProvenance() + { + if ($this->provenance->count() !== 0) { + @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); + } + return $this->provenance; + } + + /** + * The history of this annotation. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; + * @param \Google\Cloud\DocumentAI\V1\Document\Provenance[] $var + * @return $this + * @deprecated + */ + public function setProvenance($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Provenance::class); + if ($arr->count() !== 0) { + @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); + } + $this->provenance = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentOutputConfig.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentOutputConfig.php new file mode 100644 index 000000000000..9ae599503371 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentOutputConfig.php @@ -0,0 +1,76 @@ +google.cloud.documentai.v1.DocumentOutputConfig + */ +class DocumentOutputConfig extends \Google\Protobuf\Internal\Message +{ + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\DocumentOutputConfig\GcsOutputConfig $gcs_output_config + * Output config to write the results to Cloud Storage. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentIo::initOnce(); + parent::__construct($data); + } + + /** + * Output config to write the results to Cloud Storage. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig gcs_output_config = 1; + * @return \Google\Cloud\DocumentAI\V1\DocumentOutputConfig\GcsOutputConfig|null + */ + public function getGcsOutputConfig() + { + return $this->readOneof(1); + } + + public function hasGcsOutputConfig() + { + return $this->hasOneof(1); + } + + /** + * Output config to write the results to Cloud Storage. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig gcs_output_config = 1; + * @param \Google\Cloud\DocumentAI\V1\DocumentOutputConfig\GcsOutputConfig $var + * @return $this + */ + public function setGcsOutputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\DocumentOutputConfig\GcsOutputConfig::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentOutputConfig/GcsOutputConfig.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentOutputConfig/GcsOutputConfig.php new file mode 100644 index 000000000000..ff9bac233d44 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentOutputConfig/GcsOutputConfig.php @@ -0,0 +1,163 @@ +google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig + */ +class GcsOutputConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The Cloud Storage uri (a directory) of the output. + * + * Generated from protobuf field string gcs_uri = 1; + */ + protected $gcs_uri = ''; + /** + * Specifies which fields to include in the output documents. + * Only supports top level document and pages field so it must be in the + * form of `{document_field_name}` or `pages.{page_field_name}`. + * + * Generated from protobuf field .google.protobuf.FieldMask field_mask = 2; + */ + protected $field_mask = null; + /** + * Specifies the sharding config for the output document. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.ShardingConfig sharding_config = 3; + */ + protected $sharding_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $gcs_uri + * The Cloud Storage uri (a directory) of the output. + * @type \Google\Protobuf\FieldMask $field_mask + * Specifies which fields to include in the output documents. + * Only supports top level document and pages field so it must be in the + * form of `{document_field_name}` or `pages.{page_field_name}`. + * @type \Google\Cloud\DocumentAI\V1\DocumentOutputConfig\GcsOutputConfig\ShardingConfig $sharding_config + * Specifies the sharding config for the output document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentIo::initOnce(); + parent::__construct($data); + } + + /** + * The Cloud Storage uri (a directory) of the output. + * + * Generated from protobuf field string gcs_uri = 1; + * @return string + */ + public function getGcsUri() + { + return $this->gcs_uri; + } + + /** + * The Cloud Storage uri (a directory) of the output. + * + * Generated from protobuf field string gcs_uri = 1; + * @param string $var + * @return $this + */ + public function setGcsUri($var) + { + GPBUtil::checkString($var, True); + $this->gcs_uri = $var; + + return $this; + } + + /** + * Specifies which fields to include in the output documents. + * Only supports top level document and pages field so it must be in the + * form of `{document_field_name}` or `pages.{page_field_name}`. + * + * Generated from protobuf field .google.protobuf.FieldMask field_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getFieldMask() + { + return $this->field_mask; + } + + public function hasFieldMask() + { + return isset($this->field_mask); + } + + public function clearFieldMask() + { + unset($this->field_mask); + } + + /** + * Specifies which fields to include in the output documents. + * Only supports top level document and pages field so it must be in the + * form of `{document_field_name}` or `pages.{page_field_name}`. + * + * Generated from protobuf field .google.protobuf.FieldMask field_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setFieldMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->field_mask = $var; + + return $this; + } + + /** + * Specifies the sharding config for the output document. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.ShardingConfig sharding_config = 3; + * @return \Google\Cloud\DocumentAI\V1\DocumentOutputConfig\GcsOutputConfig\ShardingConfig|null + */ + public function getShardingConfig() + { + return $this->sharding_config; + } + + public function hasShardingConfig() + { + return isset($this->sharding_config); + } + + public function clearShardingConfig() + { + unset($this->sharding_config); + } + + /** + * Specifies the sharding config for the output document. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.ShardingConfig sharding_config = 3; + * @param \Google\Cloud\DocumentAI\V1\DocumentOutputConfig\GcsOutputConfig\ShardingConfig $var + * @return $this + */ + public function setShardingConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\DocumentOutputConfig\GcsOutputConfig\ShardingConfig::class); + $this->sharding_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentOutputConfig/GcsOutputConfig/ShardingConfig.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentOutputConfig/GcsOutputConfig/ShardingConfig.php new file mode 100644 index 000000000000..68e93a8e0c36 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentOutputConfig/GcsOutputConfig/ShardingConfig.php @@ -0,0 +1,101 @@ +google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.ShardingConfig + */ +class ShardingConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The number of pages per shard. + * + * Generated from protobuf field int32 pages_per_shard = 1; + */ + protected $pages_per_shard = 0; + /** + * The number of overlapping pages between consecutive shards. + * + * Generated from protobuf field int32 pages_overlap = 2; + */ + protected $pages_overlap = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $pages_per_shard + * The number of pages per shard. + * @type int $pages_overlap + * The number of overlapping pages between consecutive shards. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentIo::initOnce(); + parent::__construct($data); + } + + /** + * The number of pages per shard. + * + * Generated from protobuf field int32 pages_per_shard = 1; + * @return int + */ + public function getPagesPerShard() + { + return $this->pages_per_shard; + } + + /** + * The number of pages per shard. + * + * Generated from protobuf field int32 pages_per_shard = 1; + * @param int $var + * @return $this + */ + public function setPagesPerShard($var) + { + GPBUtil::checkInt32($var); + $this->pages_per_shard = $var; + + return $this; + } + + /** + * The number of overlapping pages between consecutive shards. + * + * Generated from protobuf field int32 pages_overlap = 2; + * @return int + */ + public function getPagesOverlap() + { + return $this->pages_overlap; + } + + /** + * The number of overlapping pages between consecutive shards. + * + * Generated from protobuf field int32 pages_overlap = 2; + * @param int $var + * @return $this + */ + public function setPagesOverlap($var) + { + GPBUtil::checkInt32($var); + $this->pages_overlap = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema.php new file mode 100644 index 000000000000..53969cd163f5 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema.php @@ -0,0 +1,179 @@ +google.cloud.documentai.v1.DocumentSchema + */ +class DocumentSchema extends \Google\Protobuf\Internal\Message +{ + /** + * Display name to show to users. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * Description of the schema. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * Entity types of the schema. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.DocumentSchema.EntityType entity_types = 3; + */ + private $entity_types; + /** + * Metadata of the schema. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema.Metadata metadata = 4; + */ + protected $metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Display name to show to users. + * @type string $description + * Description of the schema. + * @type \Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType[] $entity_types + * Entity types of the schema. + * @type \Google\Cloud\DocumentAI\V1\DocumentSchema\Metadata $metadata + * Metadata of the schema. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentSchema::initOnce(); + parent::__construct($data); + } + + /** + * Display name to show to users. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Display name to show to users. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Description of the schema. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Description of the schema. + * + * Generated from protobuf field string description = 2; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Entity types of the schema. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.DocumentSchema.EntityType entity_types = 3; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType> + */ + public function getEntityTypes() + { + return $this->entity_types; + } + + /** + * Entity types of the schema. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.DocumentSchema.EntityType entity_types = 3; + * @param \Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType[] $var + * @return $this + */ + public function setEntityTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType::class); + $this->entity_types = $arr; + + return $this; + } + + /** + * Metadata of the schema. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema.Metadata metadata = 4; + * @return \Google\Cloud\DocumentAI\V1\DocumentSchema\Metadata|null + */ + public function getMetadata() + { + return $this->metadata; + } + + public function hasMetadata() + { + return isset($this->metadata); + } + + public function clearMetadata() + { + unset($this->metadata); + } + + /** + * Metadata of the schema. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema.Metadata metadata = 4; + * @param \Google\Cloud\DocumentAI\V1\DocumentSchema\Metadata $var + * @return $this + */ + public function setMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\DocumentSchema\Metadata::class); + $this->metadata = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType.php new file mode 100644 index 000000000000..c81c989ab9be --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType.php @@ -0,0 +1,273 @@ +google.cloud.documentai.v1.DocumentSchema.EntityType + */ +class EntityType extends \Google\Protobuf\Internal\Message +{ + /** + * User defined name for the type. + * + * Generated from protobuf field string display_name = 13; + */ + protected $display_name = ''; + /** + * Name of the type. It must be unique within the schema file and + * cannot be a "Common Type". The following naming conventions are used: + * - Use `snake_casing`. + * - Name matching is case-sensitive. + * - Maximum 64 characters. + * - Must start with a letter. + * - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward + * compatibility internal infrastructure and tooling can handle any ascii + * character.) + * - The `/` is sometimes used to denote a property of a type. For example + * `line_item/amount`. This convention is deprecated, but will still be + * honored for backward compatibility. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The entity type that this type is derived from. For now, one and only + * one should be set. + * + * Generated from protobuf field repeated string base_types = 2; + */ + private $base_types; + /** + * Description the nested structure, or composition of an entity. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.DocumentSchema.EntityType.Property properties = 6; + */ + private $properties; + protected $value_source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType\EnumValues $enum_values + * If specified, lists all the possible values for this entity. This + * should not be more than a handful of values. If the number of values + * is >10 or could change frequently use the `EntityType.value_ontology` + * field and specify a list of all possible values in a value ontology + * file. + * @type string $display_name + * User defined name for the type. + * @type string $name + * Name of the type. It must be unique within the schema file and + * cannot be a "Common Type". The following naming conventions are used: + * - Use `snake_casing`. + * - Name matching is case-sensitive. + * - Maximum 64 characters. + * - Must start with a letter. + * - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward + * compatibility internal infrastructure and tooling can handle any ascii + * character.) + * - The `/` is sometimes used to denote a property of a type. For example + * `line_item/amount`. This convention is deprecated, but will still be + * honored for backward compatibility. + * @type string[] $base_types + * The entity type that this type is derived from. For now, one and only + * one should be set. + * @type \Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType\Property[] $properties + * Description the nested structure, or composition of an entity. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentSchema::initOnce(); + parent::__construct($data); + } + + /** + * If specified, lists all the possible values for this entity. This + * should not be more than a handful of values. If the number of values + * is >10 or could change frequently use the `EntityType.value_ontology` + * field and specify a list of all possible values in a value ontology + * file. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues enum_values = 14; + * @return \Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType\EnumValues|null + */ + public function getEnumValues() + { + return $this->readOneof(14); + } + + public function hasEnumValues() + { + return $this->hasOneof(14); + } + + /** + * If specified, lists all the possible values for this entity. This + * should not be more than a handful of values. If the number of values + * is >10 or could change frequently use the `EntityType.value_ontology` + * field and specify a list of all possible values in a value ontology + * file. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues enum_values = 14; + * @param \Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType\EnumValues $var + * @return $this + */ + public function setEnumValues($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType\EnumValues::class); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * User defined name for the type. + * + * Generated from protobuf field string display_name = 13; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * User defined name for the type. + * + * Generated from protobuf field string display_name = 13; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Name of the type. It must be unique within the schema file and + * cannot be a "Common Type". The following naming conventions are used: + * - Use `snake_casing`. + * - Name matching is case-sensitive. + * - Maximum 64 characters. + * - Must start with a letter. + * - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward + * compatibility internal infrastructure and tooling can handle any ascii + * character.) + * - The `/` is sometimes used to denote a property of a type. For example + * `line_item/amount`. This convention is deprecated, but will still be + * honored for backward compatibility. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the type. It must be unique within the schema file and + * cannot be a "Common Type". The following naming conventions are used: + * - Use `snake_casing`. + * - Name matching is case-sensitive. + * - Maximum 64 characters. + * - Must start with a letter. + * - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward + * compatibility internal infrastructure and tooling can handle any ascii + * character.) + * - The `/` is sometimes used to denote a property of a type. For example + * `line_item/amount`. This convention is deprecated, but will still be + * honored for backward compatibility. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The entity type that this type is derived from. For now, one and only + * one should be set. + * + * Generated from protobuf field repeated string base_types = 2; + * @return RepeatedField + */ + public function getBaseTypes() + { + return $this->base_types; + } + + /** + * The entity type that this type is derived from. For now, one and only + * one should be set. + * + * Generated from protobuf field repeated string base_types = 2; + * @param string[] $var + * @return $this + */ + public function setBaseTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->base_types = $arr; + + return $this; + } + + /** + * Description the nested structure, or composition of an entity. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.DocumentSchema.EntityType.Property properties = 6; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType\Property> + */ + public function getProperties() + { + return $this->properties; + } + + /** + * Description the nested structure, or composition of an entity. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.DocumentSchema.EntityType.Property properties = 6; + * @param \Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType\Property[] $var + * @return $this + */ + public function setProperties($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType\Property::class); + $this->properties = $arr; + + return $this; + } + + /** + * @return string + */ + public function getValueSource() + { + return $this->whichOneof("value_source"); + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/EnumValues.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/EnumValues.php new file mode 100644 index 000000000000..619a9cdde827 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/EnumValues.php @@ -0,0 +1,67 @@ +google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues + */ +class EnumValues extends \Google\Protobuf\Internal\Message +{ + /** + * The individual values that this enum values type can include. + * + * Generated from protobuf field repeated string values = 1; + */ + private $values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[] $values + * The individual values that this enum values type can include. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentSchema::initOnce(); + parent::__construct($data); + } + + /** + * The individual values that this enum values type can include. + * + * Generated from protobuf field repeated string values = 1; + * @return RepeatedField + */ + public function getValues() + { + return $this->values; + } + + /** + * The individual values that this enum values type can include. + * + * Generated from protobuf field repeated string values = 1; + * @param string[] $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->values = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/Property.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/Property.php new file mode 100644 index 000000000000..0ecbb4dc591a --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/Property.php @@ -0,0 +1,215 @@ +google.cloud.documentai.v1.DocumentSchema.EntityType.Property + */ +class Property extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the property. Follows the same guidelines as the + * EntityType name. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * User defined name for the property. + * + * Generated from protobuf field string display_name = 6; + */ + protected $display_name = ''; + /** + * A reference to the value type of the property. This type is subject + * to the same conventions as the `Entity.base_types` field. + * + * Generated from protobuf field string value_type = 2; + */ + protected $value_type = ''; + /** + * Occurrence type limits the number of instances an entity type appears + * in the document. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType occurrence_type = 3; + */ + protected $occurrence_type = 0; + /** + * Specifies how the entity's value is obtained. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema.EntityType.Property.Method method = 8; + */ + protected $method = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the property. Follows the same guidelines as the + * EntityType name. + * @type string $display_name + * User defined name for the property. + * @type string $value_type + * A reference to the value type of the property. This type is subject + * to the same conventions as the `Entity.base_types` field. + * @type int $occurrence_type + * Occurrence type limits the number of instances an entity type appears + * in the document. + * @type int $method + * Specifies how the entity's value is obtained. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentSchema::initOnce(); + parent::__construct($data); + } + + /** + * The name of the property. Follows the same guidelines as the + * EntityType name. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the property. Follows the same guidelines as the + * EntityType name. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * User defined name for the property. + * + * Generated from protobuf field string display_name = 6; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * User defined name for the property. + * + * Generated from protobuf field string display_name = 6; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * A reference to the value type of the property. This type is subject + * to the same conventions as the `Entity.base_types` field. + * + * Generated from protobuf field string value_type = 2; + * @return string + */ + public function getValueType() + { + return $this->value_type; + } + + /** + * A reference to the value type of the property. This type is subject + * to the same conventions as the `Entity.base_types` field. + * + * Generated from protobuf field string value_type = 2; + * @param string $var + * @return $this + */ + public function setValueType($var) + { + GPBUtil::checkString($var, True); + $this->value_type = $var; + + return $this; + } + + /** + * Occurrence type limits the number of instances an entity type appears + * in the document. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType occurrence_type = 3; + * @return int + */ + public function getOccurrenceType() + { + return $this->occurrence_type; + } + + /** + * Occurrence type limits the number of instances an entity type appears + * in the document. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType occurrence_type = 3; + * @param int $var + * @return $this + */ + public function setOccurrenceType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType\Property\OccurrenceType::class); + $this->occurrence_type = $var; + + return $this; + } + + /** + * Specifies how the entity's value is obtained. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema.EntityType.Property.Method method = 8; + * @return int + */ + public function getMethod() + { + return $this->method; + } + + /** + * Specifies how the entity's value is obtained. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema.EntityType.Property.Method method = 8; + * @param int $var + * @return $this + */ + public function setMethod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType\Property\Method::class); + $this->method = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/Property/Method.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/Property/Method.php new file mode 100644 index 000000000000..9bcf56e4126d --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/Property/Method.php @@ -0,0 +1,63 @@ +google.cloud.documentai.v1.DocumentSchema.EntityType.Property.Method + */ +class Method +{ + /** + * Unspecified method. It defaults to `EXTRACT`. + * + * Generated from protobuf enum METHOD_UNSPECIFIED = 0; + */ + const METHOD_UNSPECIFIED = 0; + /** + * The entity's value is directly extracted as-is from the document + * text. + * + * Generated from protobuf enum EXTRACT = 1; + */ + const EXTRACT = 1; + /** + * The entity's value is derived through inference and is not + * necessarily an exact text extraction from the document. + * + * Generated from protobuf enum DERIVE = 2; + */ + const DERIVE = 2; + + private static $valueToName = [ + self::METHOD_UNSPECIFIED => 'METHOD_UNSPECIFIED', + self::EXTRACT => 'EXTRACT', + self::DERIVE => 'DERIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/Property/OccurrenceType.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/Property/OccurrenceType.php new file mode 100644 index 000000000000..309e464b43ca --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/Property/OccurrenceType.php @@ -0,0 +1,85 @@ +google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType + */ +class OccurrenceType +{ + /** + * Unspecified occurrence type. + * + * Generated from protobuf enum OCCURRENCE_TYPE_UNSPECIFIED = 0; + */ + const OCCURRENCE_TYPE_UNSPECIFIED = 0; + /** + * There will be zero or one instance of this entity type. The same + * entity instance may be mentioned multiple times. + * + * Generated from protobuf enum OPTIONAL_ONCE = 1; + */ + const OPTIONAL_ONCE = 1; + /** + * The entity type will appear zero or multiple times. + * + * Generated from protobuf enum OPTIONAL_MULTIPLE = 2; + */ + const OPTIONAL_MULTIPLE = 2; + /** + * The entity type will only appear exactly once. The same + * entity instance may be mentioned multiple times. + * + * Generated from protobuf enum REQUIRED_ONCE = 3; + */ + const REQUIRED_ONCE = 3; + /** + * The entity type will appear once or more times. + * + * Generated from protobuf enum REQUIRED_MULTIPLE = 4; + */ + const REQUIRED_MULTIPLE = 4; + + private static $valueToName = [ + self::OCCURRENCE_TYPE_UNSPECIFIED => 'OCCURRENCE_TYPE_UNSPECIFIED', + self::OPTIONAL_ONCE => 'OPTIONAL_ONCE', + self::OPTIONAL_MULTIPLE => 'OPTIONAL_MULTIPLE', + self::REQUIRED_ONCE => 'REQUIRED_ONCE', + self::REQUIRED_MULTIPLE => 'REQUIRED_MULTIPLE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/Metadata.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/Metadata.php new file mode 100644 index 000000000000..15ac6915cb12 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/Metadata.php @@ -0,0 +1,189 @@ +google.cloud.documentai.v1.DocumentSchema.Metadata + */ +class Metadata extends \Google\Protobuf\Internal\Message +{ + /** + * If true, a `document` entity type can be applied to subdocument + * (splitting). Otherwise, it can only be applied to the entire document + * (classification). + * + * Generated from protobuf field bool document_splitter = 1; + */ + protected $document_splitter = false; + /** + * If true, on a given page, there can be multiple `document` annotations + * covering it. + * + * Generated from protobuf field bool document_allow_multiple_labels = 2; + */ + protected $document_allow_multiple_labels = false; + /** + * If set, all the nested entities must be prefixed with the parents. + * + * Generated from protobuf field bool prefixed_naming_on_properties = 6; + */ + protected $prefixed_naming_on_properties = false; + /** + * If set, we will skip the naming format validation in the schema. So the + * string values in `DocumentSchema.EntityType.name` and + * `DocumentSchema.EntityType.Property.name` will not be checked. + * + * Generated from protobuf field bool skip_naming_validation = 7; + */ + protected $skip_naming_validation = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $document_splitter + * If true, a `document` entity type can be applied to subdocument + * (splitting). Otherwise, it can only be applied to the entire document + * (classification). + * @type bool $document_allow_multiple_labels + * If true, on a given page, there can be multiple `document` annotations + * covering it. + * @type bool $prefixed_naming_on_properties + * If set, all the nested entities must be prefixed with the parents. + * @type bool $skip_naming_validation + * If set, we will skip the naming format validation in the schema. So the + * string values in `DocumentSchema.EntityType.name` and + * `DocumentSchema.EntityType.Property.name` will not be checked. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentSchema::initOnce(); + parent::__construct($data); + } + + /** + * If true, a `document` entity type can be applied to subdocument + * (splitting). Otherwise, it can only be applied to the entire document + * (classification). + * + * Generated from protobuf field bool document_splitter = 1; + * @return bool + */ + public function getDocumentSplitter() + { + return $this->document_splitter; + } + + /** + * If true, a `document` entity type can be applied to subdocument + * (splitting). Otherwise, it can only be applied to the entire document + * (classification). + * + * Generated from protobuf field bool document_splitter = 1; + * @param bool $var + * @return $this + */ + public function setDocumentSplitter($var) + { + GPBUtil::checkBool($var); + $this->document_splitter = $var; + + return $this; + } + + /** + * If true, on a given page, there can be multiple `document` annotations + * covering it. + * + * Generated from protobuf field bool document_allow_multiple_labels = 2; + * @return bool + */ + public function getDocumentAllowMultipleLabels() + { + return $this->document_allow_multiple_labels; + } + + /** + * If true, on a given page, there can be multiple `document` annotations + * covering it. + * + * Generated from protobuf field bool document_allow_multiple_labels = 2; + * @param bool $var + * @return $this + */ + public function setDocumentAllowMultipleLabels($var) + { + GPBUtil::checkBool($var); + $this->document_allow_multiple_labels = $var; + + return $this; + } + + /** + * If set, all the nested entities must be prefixed with the parents. + * + * Generated from protobuf field bool prefixed_naming_on_properties = 6; + * @return bool + */ + public function getPrefixedNamingOnProperties() + { + return $this->prefixed_naming_on_properties; + } + + /** + * If set, all the nested entities must be prefixed with the parents. + * + * Generated from protobuf field bool prefixed_naming_on_properties = 6; + * @param bool $var + * @return $this + */ + public function setPrefixedNamingOnProperties($var) + { + GPBUtil::checkBool($var); + $this->prefixed_naming_on_properties = $var; + + return $this; + } + + /** + * If set, we will skip the naming format validation in the schema. So the + * string values in `DocumentSchema.EntityType.name` and + * `DocumentSchema.EntityType.Property.name` will not be checked. + * + * Generated from protobuf field bool skip_naming_validation = 7; + * @return bool + */ + public function getSkipNamingValidation() + { + return $this->skip_naming_validation; + } + + /** + * If set, we will skip the naming format validation in the schema. So the + * string values in `DocumentSchema.EntityType.name` and + * `DocumentSchema.EntityType.Property.name` will not be checked. + * + * Generated from protobuf field bool skip_naming_validation = 7; + * @param bool $var + * @return $this + */ + public function setSkipNamingValidation($var) + { + GPBUtil::checkBool($var); + $this->skip_naming_validation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EnableProcessorMetadata.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EnableProcessorMetadata.php new file mode 100644 index 000000000000..2dcc788db95e --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EnableProcessorMetadata.php @@ -0,0 +1,79 @@ +google.cloud.documentai.v1.EnableProcessorMetadata + */ +class EnableProcessorMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The basic metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 5; + */ + protected $common_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $common_metadata + * The basic metadata of the long-running operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * The basic metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 5; + * @return \Google\Cloud\DocumentAI\V1\CommonOperationMetadata|null + */ + public function getCommonMetadata() + { + return $this->common_metadata; + } + + public function hasCommonMetadata() + { + return isset($this->common_metadata); + } + + public function clearCommonMetadata() + { + unset($this->common_metadata); + } + + /** + * The basic metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 5; + * @param \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $var + * @return $this + */ + public function setCommonMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\CommonOperationMetadata::class); + $this->common_metadata = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EnableProcessorRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EnableProcessorRequest.php new file mode 100644 index 000000000000..20b1a5c46cfc --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EnableProcessorRequest.php @@ -0,0 +1,69 @@ +google.cloud.documentai.v1.EnableProcessorRequest + */ +class EnableProcessorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The processor resource name to be enabled. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The processor resource name to be enabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The processor resource name to be enabled. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The processor resource name to be enabled. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EnableProcessorResponse.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EnableProcessorResponse.php new file mode 100644 index 000000000000..715cfb6a99c8 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EnableProcessorResponse.php @@ -0,0 +1,35 @@ +google.cloud.documentai.v1.EnableProcessorResponse + */ +class EnableProcessorResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluateProcessorVersionMetadata.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluateProcessorVersionMetadata.php new file mode 100644 index 000000000000..c25a265c42b8 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluateProcessorVersionMetadata.php @@ -0,0 +1,79 @@ +google.cloud.documentai.v1.EvaluateProcessorVersionMetadata + */ +class EvaluateProcessorVersionMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The basic metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; + */ + protected $common_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $common_metadata + * The basic metadata of the long-running operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * The basic metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; + * @return \Google\Cloud\DocumentAI\V1\CommonOperationMetadata|null + */ + public function getCommonMetadata() + { + return $this->common_metadata; + } + + public function hasCommonMetadata() + { + return isset($this->common_metadata); + } + + public function clearCommonMetadata() + { + unset($this->common_metadata); + } + + /** + * The basic metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; + * @param \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $var + * @return $this + */ + public function setCommonMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\CommonOperationMetadata::class); + $this->common_metadata = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluateProcessorVersionRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluateProcessorVersionRequest.php new file mode 100644 index 000000000000..bff4cf7bb5ea --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluateProcessorVersionRequest.php @@ -0,0 +1,146 @@ +google.cloud.documentai.v1.EvaluateProcessorVersionRequest + */ +class EvaluateProcessorVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to + * evaluate. + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + * + * Generated from protobuf field string processor_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $processor_version = ''; + /** + * Optional. The documents used in the evaluation. If unspecified, use the + * processor's dataset as evaluation input. + * + * Generated from protobuf field .google.cloud.documentai.v1.BatchDocumentsInputConfig evaluation_documents = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $evaluation_documents = null; + + /** + * @param string $processorVersion Required. The resource name of the + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to + * evaluate. + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + * Please see {@see DocumentProcessorServiceClient::processorVersionName()} for help formatting this field. + * + * @return \Google\Cloud\DocumentAI\V1\EvaluateProcessorVersionRequest + * + * @experimental + */ + public static function build(string $processorVersion): self + { + return (new self()) + ->setProcessorVersion($processorVersion); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $processor_version + * Required. The resource name of the + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to + * evaluate. + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + * @type \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig $evaluation_documents + * Optional. The documents used in the evaluation. If unspecified, use the + * processor's dataset as evaluation input. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to + * evaluate. + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + * + * Generated from protobuf field string processor_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getProcessorVersion() + { + return $this->processor_version; + } + + /** + * Required. The resource name of the + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to + * evaluate. + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + * + * Generated from protobuf field string processor_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setProcessorVersion($var) + { + GPBUtil::checkString($var, True); + $this->processor_version = $var; + + return $this; + } + + /** + * Optional. The documents used in the evaluation. If unspecified, use the + * processor's dataset as evaluation input. + * + * Generated from protobuf field .google.cloud.documentai.v1.BatchDocumentsInputConfig evaluation_documents = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig|null + */ + public function getEvaluationDocuments() + { + return $this->evaluation_documents; + } + + public function hasEvaluationDocuments() + { + return isset($this->evaluation_documents); + } + + public function clearEvaluationDocuments() + { + unset($this->evaluation_documents); + } + + /** + * Optional. The documents used in the evaluation. If unspecified, use the + * processor's dataset as evaluation input. + * + * Generated from protobuf field .google.cloud.documentai.v1.BatchDocumentsInputConfig evaluation_documents = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig $var + * @return $this + */ + public function setEvaluationDocuments($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig::class); + $this->evaluation_documents = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluateProcessorVersionResponse.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluateProcessorVersionResponse.php new file mode 100644 index 000000000000..fe95e455a867 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluateProcessorVersionResponse.php @@ -0,0 +1,69 @@ +google.cloud.documentai.v1.EvaluateProcessorVersionResponse + */ +class EvaluateProcessorVersionResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the created evaluation. + * + * Generated from protobuf field string evaluation = 2; + */ + protected $evaluation = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $evaluation + * The resource name of the created evaluation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the created evaluation. + * + * Generated from protobuf field string evaluation = 2; + * @return string + */ + public function getEvaluation() + { + return $this->evaluation; + } + + /** + * The resource name of the created evaluation. + * + * Generated from protobuf field string evaluation = 2; + * @param string $var + * @return $this + */ + public function setEvaluation($var) + { + GPBUtil::checkString($var, True); + $this->evaluation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation.php new file mode 100644 index 000000000000..7c1780081451 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation.php @@ -0,0 +1,309 @@ +google.cloud.documentai.v1.Evaluation + */ +class Evaluation extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the evaluation. + * Format: + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The time that the evaluation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; + */ + protected $create_time = null; + /** + * Counters for the documents used in the evaluation. + * + * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.Counters document_counters = 5; + */ + protected $document_counters = null; + /** + * Metrics for all the entities in aggregate. + * + * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics all_entities_metrics = 3; + */ + protected $all_entities_metrics = null; + /** + * Metrics across confidence levels, for different entities. + * + * Generated from protobuf field map entity_metrics = 4; + */ + private $entity_metrics; + /** + * The KMS key name used for encryption. + * + * Generated from protobuf field string kms_key_name = 6; + */ + protected $kms_key_name = ''; + /** + * The KMS key version with which data is encrypted. + * + * Generated from protobuf field string kms_key_version_name = 7; + */ + protected $kms_key_version_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the evaluation. + * Format: + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}` + * @type \Google\Protobuf\Timestamp $create_time + * The time that the evaluation was created. + * @type \Google\Cloud\DocumentAI\V1\Evaluation\Counters $document_counters + * Counters for the documents used in the evaluation. + * @type \Google\Cloud\DocumentAI\V1\Evaluation\MultiConfidenceMetrics $all_entities_metrics + * Metrics for all the entities in aggregate. + * @type array|\Google\Protobuf\Internal\MapField $entity_metrics + * Metrics across confidence levels, for different entities. + * @type string $kms_key_name + * The KMS key name used for encryption. + * @type string $kms_key_version_name + * The KMS key version with which data is encrypted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Evaluation::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the evaluation. + * Format: + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the evaluation. + * Format: + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}` + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The time that the evaluation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * The time that the evaluation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Counters for the documents used in the evaluation. + * + * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.Counters document_counters = 5; + * @return \Google\Cloud\DocumentAI\V1\Evaluation\Counters|null + */ + public function getDocumentCounters() + { + return $this->document_counters; + } + + public function hasDocumentCounters() + { + return isset($this->document_counters); + } + + public function clearDocumentCounters() + { + unset($this->document_counters); + } + + /** + * Counters for the documents used in the evaluation. + * + * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.Counters document_counters = 5; + * @param \Google\Cloud\DocumentAI\V1\Evaluation\Counters $var + * @return $this + */ + public function setDocumentCounters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Evaluation\Counters::class); + $this->document_counters = $var; + + return $this; + } + + /** + * Metrics for all the entities in aggregate. + * + * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics all_entities_metrics = 3; + * @return \Google\Cloud\DocumentAI\V1\Evaluation\MultiConfidenceMetrics|null + */ + public function getAllEntitiesMetrics() + { + return $this->all_entities_metrics; + } + + public function hasAllEntitiesMetrics() + { + return isset($this->all_entities_metrics); + } + + public function clearAllEntitiesMetrics() + { + unset($this->all_entities_metrics); + } + + /** + * Metrics for all the entities in aggregate. + * + * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics all_entities_metrics = 3; + * @param \Google\Cloud\DocumentAI\V1\Evaluation\MultiConfidenceMetrics $var + * @return $this + */ + public function setAllEntitiesMetrics($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Evaluation\MultiConfidenceMetrics::class); + $this->all_entities_metrics = $var; + + return $this; + } + + /** + * Metrics across confidence levels, for different entities. + * + * Generated from protobuf field map entity_metrics = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getEntityMetrics() + { + return $this->entity_metrics; + } + + /** + * Metrics across confidence levels, for different entities. + * + * Generated from protobuf field map entity_metrics = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setEntityMetrics($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Evaluation\MultiConfidenceMetrics::class); + $this->entity_metrics = $arr; + + return $this; + } + + /** + * The KMS key name used for encryption. + * + * Generated from protobuf field string kms_key_name = 6; + * @return string + */ + public function getKmsKeyName() + { + return $this->kms_key_name; + } + + /** + * The KMS key name used for encryption. + * + * Generated from protobuf field string kms_key_name = 6; + * @param string $var + * @return $this + */ + public function setKmsKeyName($var) + { + GPBUtil::checkString($var, True); + $this->kms_key_name = $var; + + return $this; + } + + /** + * The KMS key version with which data is encrypted. + * + * Generated from protobuf field string kms_key_version_name = 7; + * @return string + */ + public function getKmsKeyVersionName() + { + return $this->kms_key_version_name; + } + + /** + * The KMS key version with which data is encrypted. + * + * Generated from protobuf field string kms_key_version_name = 7; + * @param string $var + * @return $this + */ + public function setKmsKeyVersionName($var) + { + GPBUtil::checkString($var, True); + $this->kms_key_version_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/ConfidenceLevelMetrics.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/ConfidenceLevelMetrics.php new file mode 100644 index 000000000000..5094320ac79e --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/ConfidenceLevelMetrics.php @@ -0,0 +1,111 @@ +google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics + */ +class ConfidenceLevelMetrics extends \Google\Protobuf\Internal\Message +{ + /** + * The confidence level. + * + * Generated from protobuf field float confidence_level = 1; + */ + protected $confidence_level = 0.0; + /** + * The metrics at the specific confidence level. + * + * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.Metrics metrics = 2; + */ + protected $metrics = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $confidence_level + * The confidence level. + * @type \Google\Cloud\DocumentAI\V1\Evaluation\Metrics $metrics + * The metrics at the specific confidence level. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Evaluation::initOnce(); + parent::__construct($data); + } + + /** + * The confidence level. + * + * Generated from protobuf field float confidence_level = 1; + * @return float + */ + public function getConfidenceLevel() + { + return $this->confidence_level; + } + + /** + * The confidence level. + * + * Generated from protobuf field float confidence_level = 1; + * @param float $var + * @return $this + */ + public function setConfidenceLevel($var) + { + GPBUtil::checkFloat($var); + $this->confidence_level = $var; + + return $this; + } + + /** + * The metrics at the specific confidence level. + * + * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.Metrics metrics = 2; + * @return \Google\Cloud\DocumentAI\V1\Evaluation\Metrics|null + */ + public function getMetrics() + { + return $this->metrics; + } + + public function hasMetrics() + { + return isset($this->metrics); + } + + public function clearMetrics() + { + unset($this->metrics); + } + + /** + * The metrics at the specific confidence level. + * + * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.Metrics metrics = 2; + * @param \Google\Cloud\DocumentAI\V1\Evaluation\Metrics $var + * @return $this + */ + public function setMetrics($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Evaluation\Metrics::class); + $this->metrics = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/Counters.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/Counters.php new file mode 100644 index 000000000000..ef1d774664cc --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/Counters.php @@ -0,0 +1,177 @@ +google.cloud.documentai.v1.Evaluation.Counters + */ +class Counters extends \Google\Protobuf\Internal\Message +{ + /** + * How many documents were sent for evaluation. + * + * Generated from protobuf field int32 input_documents_count = 1; + */ + protected $input_documents_count = 0; + /** + * How many documents were not included in the evaluation as they didn't + * pass validation. + * + * Generated from protobuf field int32 invalid_documents_count = 2; + */ + protected $invalid_documents_count = 0; + /** + * How many documents were not included in the evaluation as Document AI + * failed to process them. + * + * Generated from protobuf field int32 failed_documents_count = 3; + */ + protected $failed_documents_count = 0; + /** + * How many documents were used in the evaluation. + * + * Generated from protobuf field int32 evaluated_documents_count = 4; + */ + protected $evaluated_documents_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $input_documents_count + * How many documents were sent for evaluation. + * @type int $invalid_documents_count + * How many documents were not included in the evaluation as they didn't + * pass validation. + * @type int $failed_documents_count + * How many documents were not included in the evaluation as Document AI + * failed to process them. + * @type int $evaluated_documents_count + * How many documents were used in the evaluation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Evaluation::initOnce(); + parent::__construct($data); + } + + /** + * How many documents were sent for evaluation. + * + * Generated from protobuf field int32 input_documents_count = 1; + * @return int + */ + public function getInputDocumentsCount() + { + return $this->input_documents_count; + } + + /** + * How many documents were sent for evaluation. + * + * Generated from protobuf field int32 input_documents_count = 1; + * @param int $var + * @return $this + */ + public function setInputDocumentsCount($var) + { + GPBUtil::checkInt32($var); + $this->input_documents_count = $var; + + return $this; + } + + /** + * How many documents were not included in the evaluation as they didn't + * pass validation. + * + * Generated from protobuf field int32 invalid_documents_count = 2; + * @return int + */ + public function getInvalidDocumentsCount() + { + return $this->invalid_documents_count; + } + + /** + * How many documents were not included in the evaluation as they didn't + * pass validation. + * + * Generated from protobuf field int32 invalid_documents_count = 2; + * @param int $var + * @return $this + */ + public function setInvalidDocumentsCount($var) + { + GPBUtil::checkInt32($var); + $this->invalid_documents_count = $var; + + return $this; + } + + /** + * How many documents were not included in the evaluation as Document AI + * failed to process them. + * + * Generated from protobuf field int32 failed_documents_count = 3; + * @return int + */ + public function getFailedDocumentsCount() + { + return $this->failed_documents_count; + } + + /** + * How many documents were not included in the evaluation as Document AI + * failed to process them. + * + * Generated from protobuf field int32 failed_documents_count = 3; + * @param int $var + * @return $this + */ + public function setFailedDocumentsCount($var) + { + GPBUtil::checkInt32($var); + $this->failed_documents_count = $var; + + return $this; + } + + /** + * How many documents were used in the evaluation. + * + * Generated from protobuf field int32 evaluated_documents_count = 4; + * @return int + */ + public function getEvaluatedDocumentsCount() + { + return $this->evaluated_documents_count; + } + + /** + * How many documents were used in the evaluation. + * + * Generated from protobuf field int32 evaluated_documents_count = 4; + * @param int $var + * @return $this + */ + public function setEvaluatedDocumentsCount($var) + { + GPBUtil::checkInt32($var); + $this->evaluated_documents_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/Metrics.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/Metrics.php new file mode 100644 index 000000000000..f73063ace65e --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/Metrics.php @@ -0,0 +1,407 @@ +google.cloud.documentai.v1.Evaluation.Metrics + */ +class Metrics extends \Google\Protobuf\Internal\Message +{ + /** + * The calculated precision. + * + * Generated from protobuf field float precision = 1; + */ + protected $precision = 0.0; + /** + * The calculated recall. + * + * Generated from protobuf field float recall = 2; + */ + protected $recall = 0.0; + /** + * The calculated f1 score. + * + * Generated from protobuf field float f1_score = 3; + */ + protected $f1_score = 0.0; + /** + * The amount of occurrences in predicted documents. + * + * Generated from protobuf field int32 predicted_occurrences_count = 4; + */ + protected $predicted_occurrences_count = 0; + /** + * The amount of occurrences in ground truth documents. + * + * Generated from protobuf field int32 ground_truth_occurrences_count = 5; + */ + protected $ground_truth_occurrences_count = 0; + /** + * The amount of documents with a predicted occurrence. + * + * Generated from protobuf field int32 predicted_document_count = 10; + */ + protected $predicted_document_count = 0; + /** + * The amount of documents with a ground truth occurrence. + * + * Generated from protobuf field int32 ground_truth_document_count = 11; + */ + protected $ground_truth_document_count = 0; + /** + * The amount of true positives. + * + * Generated from protobuf field int32 true_positives_count = 6; + */ + protected $true_positives_count = 0; + /** + * The amount of false positives. + * + * Generated from protobuf field int32 false_positives_count = 7; + */ + protected $false_positives_count = 0; + /** + * The amount of false negatives. + * + * Generated from protobuf field int32 false_negatives_count = 8; + */ + protected $false_negatives_count = 0; + /** + * The amount of documents that had an occurrence of this label. + * + * Generated from protobuf field int32 total_documents_count = 9; + */ + protected $total_documents_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $precision + * The calculated precision. + * @type float $recall + * The calculated recall. + * @type float $f1_score + * The calculated f1 score. + * @type int $predicted_occurrences_count + * The amount of occurrences in predicted documents. + * @type int $ground_truth_occurrences_count + * The amount of occurrences in ground truth documents. + * @type int $predicted_document_count + * The amount of documents with a predicted occurrence. + * @type int $ground_truth_document_count + * The amount of documents with a ground truth occurrence. + * @type int $true_positives_count + * The amount of true positives. + * @type int $false_positives_count + * The amount of false positives. + * @type int $false_negatives_count + * The amount of false negatives. + * @type int $total_documents_count + * The amount of documents that had an occurrence of this label. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Evaluation::initOnce(); + parent::__construct($data); + } + + /** + * The calculated precision. + * + * Generated from protobuf field float precision = 1; + * @return float + */ + public function getPrecision() + { + return $this->precision; + } + + /** + * The calculated precision. + * + * Generated from protobuf field float precision = 1; + * @param float $var + * @return $this + */ + public function setPrecision($var) + { + GPBUtil::checkFloat($var); + $this->precision = $var; + + return $this; + } + + /** + * The calculated recall. + * + * Generated from protobuf field float recall = 2; + * @return float + */ + public function getRecall() + { + return $this->recall; + } + + /** + * The calculated recall. + * + * Generated from protobuf field float recall = 2; + * @param float $var + * @return $this + */ + public function setRecall($var) + { + GPBUtil::checkFloat($var); + $this->recall = $var; + + return $this; + } + + /** + * The calculated f1 score. + * + * Generated from protobuf field float f1_score = 3; + * @return float + */ + public function getF1Score() + { + return $this->f1_score; + } + + /** + * The calculated f1 score. + * + * Generated from protobuf field float f1_score = 3; + * @param float $var + * @return $this + */ + public function setF1Score($var) + { + GPBUtil::checkFloat($var); + $this->f1_score = $var; + + return $this; + } + + /** + * The amount of occurrences in predicted documents. + * + * Generated from protobuf field int32 predicted_occurrences_count = 4; + * @return int + */ + public function getPredictedOccurrencesCount() + { + return $this->predicted_occurrences_count; + } + + /** + * The amount of occurrences in predicted documents. + * + * Generated from protobuf field int32 predicted_occurrences_count = 4; + * @param int $var + * @return $this + */ + public function setPredictedOccurrencesCount($var) + { + GPBUtil::checkInt32($var); + $this->predicted_occurrences_count = $var; + + return $this; + } + + /** + * The amount of occurrences in ground truth documents. + * + * Generated from protobuf field int32 ground_truth_occurrences_count = 5; + * @return int + */ + public function getGroundTruthOccurrencesCount() + { + return $this->ground_truth_occurrences_count; + } + + /** + * The amount of occurrences in ground truth documents. + * + * Generated from protobuf field int32 ground_truth_occurrences_count = 5; + * @param int $var + * @return $this + */ + public function setGroundTruthOccurrencesCount($var) + { + GPBUtil::checkInt32($var); + $this->ground_truth_occurrences_count = $var; + + return $this; + } + + /** + * The amount of documents with a predicted occurrence. + * + * Generated from protobuf field int32 predicted_document_count = 10; + * @return int + */ + public function getPredictedDocumentCount() + { + return $this->predicted_document_count; + } + + /** + * The amount of documents with a predicted occurrence. + * + * Generated from protobuf field int32 predicted_document_count = 10; + * @param int $var + * @return $this + */ + public function setPredictedDocumentCount($var) + { + GPBUtil::checkInt32($var); + $this->predicted_document_count = $var; + + return $this; + } + + /** + * The amount of documents with a ground truth occurrence. + * + * Generated from protobuf field int32 ground_truth_document_count = 11; + * @return int + */ + public function getGroundTruthDocumentCount() + { + return $this->ground_truth_document_count; + } + + /** + * The amount of documents with a ground truth occurrence. + * + * Generated from protobuf field int32 ground_truth_document_count = 11; + * @param int $var + * @return $this + */ + public function setGroundTruthDocumentCount($var) + { + GPBUtil::checkInt32($var); + $this->ground_truth_document_count = $var; + + return $this; + } + + /** + * The amount of true positives. + * + * Generated from protobuf field int32 true_positives_count = 6; + * @return int + */ + public function getTruePositivesCount() + { + return $this->true_positives_count; + } + + /** + * The amount of true positives. + * + * Generated from protobuf field int32 true_positives_count = 6; + * @param int $var + * @return $this + */ + public function setTruePositivesCount($var) + { + GPBUtil::checkInt32($var); + $this->true_positives_count = $var; + + return $this; + } + + /** + * The amount of false positives. + * + * Generated from protobuf field int32 false_positives_count = 7; + * @return int + */ + public function getFalsePositivesCount() + { + return $this->false_positives_count; + } + + /** + * The amount of false positives. + * + * Generated from protobuf field int32 false_positives_count = 7; + * @param int $var + * @return $this + */ + public function setFalsePositivesCount($var) + { + GPBUtil::checkInt32($var); + $this->false_positives_count = $var; + + return $this; + } + + /** + * The amount of false negatives. + * + * Generated from protobuf field int32 false_negatives_count = 8; + * @return int + */ + public function getFalseNegativesCount() + { + return $this->false_negatives_count; + } + + /** + * The amount of false negatives. + * + * Generated from protobuf field int32 false_negatives_count = 8; + * @param int $var + * @return $this + */ + public function setFalseNegativesCount($var) + { + GPBUtil::checkInt32($var); + $this->false_negatives_count = $var; + + return $this; + } + + /** + * The amount of documents that had an occurrence of this label. + * + * Generated from protobuf field int32 total_documents_count = 9; + * @return int + */ + public function getTotalDocumentsCount() + { + return $this->total_documents_count; + } + + /** + * The amount of documents that had an occurrence of this label. + * + * Generated from protobuf field int32 total_documents_count = 9; + * @param int $var + * @return $this + */ + public function setTotalDocumentsCount($var) + { + GPBUtil::checkInt32($var); + $this->total_documents_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/MultiConfidenceMetrics.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/MultiConfidenceMetrics.php new file mode 100644 index 000000000000..0b9d765c0bdc --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/MultiConfidenceMetrics.php @@ -0,0 +1,287 @@ +google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics + */ +class MultiConfidenceMetrics extends \Google\Protobuf\Internal\Message +{ + /** + * Metrics across confidence levels with fuzzy matching enabled. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + */ + private $confidence_level_metrics; + /** + * Metrics across confidence levels with only exact matching. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + */ + private $confidence_level_metrics_exact; + /** + * The calculated area under the precision recall curve (AUPRC), computed by + * integrating over all confidence thresholds. + * + * Generated from protobuf field float auprc = 2; + */ + protected $auprc = 0.0; + /** + * The Estimated Calibration Error (ECE) of the confidence of the predicted + * entities. + * + * Generated from protobuf field float estimated_calibration_error = 3; + */ + protected $estimated_calibration_error = 0.0; + /** + * The AUPRC for metrics with fuzzy matching disabled, i.e., exact matching + * only. + * + * Generated from protobuf field float auprc_exact = 5; + */ + protected $auprc_exact = 0.0; + /** + * The ECE for the predicted entities with fuzzy matching disabled, i.e., + * exact matching only. + * + * Generated from protobuf field float estimated_calibration_error_exact = 6; + */ + protected $estimated_calibration_error_exact = 0.0; + /** + * The metrics type for the label. + * + * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.MetricsType metrics_type = 7; + */ + protected $metrics_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Evaluation\ConfidenceLevelMetrics[] $confidence_level_metrics + * Metrics across confidence levels with fuzzy matching enabled. + * @type \Google\Cloud\DocumentAI\V1\Evaluation\ConfidenceLevelMetrics[] $confidence_level_metrics_exact + * Metrics across confidence levels with only exact matching. + * @type float $auprc + * The calculated area under the precision recall curve (AUPRC), computed by + * integrating over all confidence thresholds. + * @type float $estimated_calibration_error + * The Estimated Calibration Error (ECE) of the confidence of the predicted + * entities. + * @type float $auprc_exact + * The AUPRC for metrics with fuzzy matching disabled, i.e., exact matching + * only. + * @type float $estimated_calibration_error_exact + * The ECE for the predicted entities with fuzzy matching disabled, i.e., + * exact matching only. + * @type int $metrics_type + * The metrics type for the label. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Evaluation::initOnce(); + parent::__construct($data); + } + + /** + * Metrics across confidence levels with fuzzy matching enabled. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Evaluation\ConfidenceLevelMetrics> + */ + public function getConfidenceLevelMetrics() + { + return $this->confidence_level_metrics; + } + + /** + * Metrics across confidence levels with fuzzy matching enabled. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + * @param \Google\Cloud\DocumentAI\V1\Evaluation\ConfidenceLevelMetrics[] $var + * @return $this + */ + public function setConfidenceLevelMetrics($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Evaluation\ConfidenceLevelMetrics::class); + $this->confidence_level_metrics = $arr; + + return $this; + } + + /** + * Metrics across confidence levels with only exact matching. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Evaluation\ConfidenceLevelMetrics> + */ + public function getConfidenceLevelMetricsExact() + { + return $this->confidence_level_metrics_exact; + } + + /** + * Metrics across confidence levels with only exact matching. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + * @param \Google\Cloud\DocumentAI\V1\Evaluation\ConfidenceLevelMetrics[] $var + * @return $this + */ + public function setConfidenceLevelMetricsExact($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Evaluation\ConfidenceLevelMetrics::class); + $this->confidence_level_metrics_exact = $arr; + + return $this; + } + + /** + * The calculated area under the precision recall curve (AUPRC), computed by + * integrating over all confidence thresholds. + * + * Generated from protobuf field float auprc = 2; + * @return float + */ + public function getAuprc() + { + return $this->auprc; + } + + /** + * The calculated area under the precision recall curve (AUPRC), computed by + * integrating over all confidence thresholds. + * + * Generated from protobuf field float auprc = 2; + * @param float $var + * @return $this + */ + public function setAuprc($var) + { + GPBUtil::checkFloat($var); + $this->auprc = $var; + + return $this; + } + + /** + * The Estimated Calibration Error (ECE) of the confidence of the predicted + * entities. + * + * Generated from protobuf field float estimated_calibration_error = 3; + * @return float + */ + public function getEstimatedCalibrationError() + { + return $this->estimated_calibration_error; + } + + /** + * The Estimated Calibration Error (ECE) of the confidence of the predicted + * entities. + * + * Generated from protobuf field float estimated_calibration_error = 3; + * @param float $var + * @return $this + */ + public function setEstimatedCalibrationError($var) + { + GPBUtil::checkFloat($var); + $this->estimated_calibration_error = $var; + + return $this; + } + + /** + * The AUPRC for metrics with fuzzy matching disabled, i.e., exact matching + * only. + * + * Generated from protobuf field float auprc_exact = 5; + * @return float + */ + public function getAuprcExact() + { + return $this->auprc_exact; + } + + /** + * The AUPRC for metrics with fuzzy matching disabled, i.e., exact matching + * only. + * + * Generated from protobuf field float auprc_exact = 5; + * @param float $var + * @return $this + */ + public function setAuprcExact($var) + { + GPBUtil::checkFloat($var); + $this->auprc_exact = $var; + + return $this; + } + + /** + * The ECE for the predicted entities with fuzzy matching disabled, i.e., + * exact matching only. + * + * Generated from protobuf field float estimated_calibration_error_exact = 6; + * @return float + */ + public function getEstimatedCalibrationErrorExact() + { + return $this->estimated_calibration_error_exact; + } + + /** + * The ECE for the predicted entities with fuzzy matching disabled, i.e., + * exact matching only. + * + * Generated from protobuf field float estimated_calibration_error_exact = 6; + * @param float $var + * @return $this + */ + public function setEstimatedCalibrationErrorExact($var) + { + GPBUtil::checkFloat($var); + $this->estimated_calibration_error_exact = $var; + + return $this; + } + + /** + * The metrics type for the label. + * + * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.MetricsType metrics_type = 7; + * @return int + */ + public function getMetricsType() + { + return $this->metrics_type; + } + + /** + * The metrics type for the label. + * + * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.MetricsType metrics_type = 7; + * @param int $var + * @return $this + */ + public function setMetricsType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\Evaluation\MultiConfidenceMetrics\MetricsType::class); + $this->metrics_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/MultiConfidenceMetrics/MetricsType.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/MultiConfidenceMetrics/MetricsType.php new file mode 100644 index 000000000000..6659a5e63484 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/MultiConfidenceMetrics/MetricsType.php @@ -0,0 +1,60 @@ +google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.MetricsType + */ +class MetricsType +{ + /** + * The metrics type is unspecified. By default, metrics without a + * particular specification are for leaf entity types (i.e., top-level + * entity types without child types, or child types which are not + * parent types themselves). + * + * Generated from protobuf enum METRICS_TYPE_UNSPECIFIED = 0; + */ + const METRICS_TYPE_UNSPECIFIED = 0; + /** + * Indicates whether metrics for this particular label type represent an + * aggregate of metrics for other types instead of being based on actual + * TP/FP/FN values for the label type. Metrics for parent (i.e., non-leaf) + * entity types are an aggregate of metrics for their children. + * + * Generated from protobuf enum AGGREGATE = 1; + */ + const AGGREGATE = 1; + + private static $valueToName = [ + self::METRICS_TYPE_UNSPECIFIED => 'METRICS_TYPE_UNSPECIFIED', + self::AGGREGATE => 'AGGREGATE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluationReference.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluationReference.php new file mode 100644 index 000000000000..3bc0cdaf5c6d --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluationReference.php @@ -0,0 +1,189 @@ +google.cloud.documentai.v1.EvaluationReference + */ +class EvaluationReference extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the Long Running Operation for the evaluation. + * + * Generated from protobuf field string operation = 1; + */ + protected $operation = ''; + /** + * The resource name of the evaluation. + * + * Generated from protobuf field string evaluation = 2 [(.google.api.resource_reference) = { + */ + protected $evaluation = ''; + /** + * An aggregate of the statistics for the evaluation with fuzzy matching on. + * + * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.Metrics aggregate_metrics = 4; + */ + protected $aggregate_metrics = null; + /** + * An aggregate of the statistics for the evaluation with fuzzy matching off. + * + * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.Metrics aggregate_metrics_exact = 5; + */ + protected $aggregate_metrics_exact = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $operation + * The resource name of the Long Running Operation for the evaluation. + * @type string $evaluation + * The resource name of the evaluation. + * @type \Google\Cloud\DocumentAI\V1\Evaluation\Metrics $aggregate_metrics + * An aggregate of the statistics for the evaluation with fuzzy matching on. + * @type \Google\Cloud\DocumentAI\V1\Evaluation\Metrics $aggregate_metrics_exact + * An aggregate of the statistics for the evaluation with fuzzy matching off. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Evaluation::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the Long Running Operation for the evaluation. + * + * Generated from protobuf field string operation = 1; + * @return string + */ + public function getOperation() + { + return $this->operation; + } + + /** + * The resource name of the Long Running Operation for the evaluation. + * + * Generated from protobuf field string operation = 1; + * @param string $var + * @return $this + */ + public function setOperation($var) + { + GPBUtil::checkString($var, True); + $this->operation = $var; + + return $this; + } + + /** + * The resource name of the evaluation. + * + * Generated from protobuf field string evaluation = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getEvaluation() + { + return $this->evaluation; + } + + /** + * The resource name of the evaluation. + * + * Generated from protobuf field string evaluation = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setEvaluation($var) + { + GPBUtil::checkString($var, True); + $this->evaluation = $var; + + return $this; + } + + /** + * An aggregate of the statistics for the evaluation with fuzzy matching on. + * + * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.Metrics aggregate_metrics = 4; + * @return \Google\Cloud\DocumentAI\V1\Evaluation\Metrics|null + */ + public function getAggregateMetrics() + { + return $this->aggregate_metrics; + } + + public function hasAggregateMetrics() + { + return isset($this->aggregate_metrics); + } + + public function clearAggregateMetrics() + { + unset($this->aggregate_metrics); + } + + /** + * An aggregate of the statistics for the evaluation with fuzzy matching on. + * + * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.Metrics aggregate_metrics = 4; + * @param \Google\Cloud\DocumentAI\V1\Evaluation\Metrics $var + * @return $this + */ + public function setAggregateMetrics($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Evaluation\Metrics::class); + $this->aggregate_metrics = $var; + + return $this; + } + + /** + * An aggregate of the statistics for the evaluation with fuzzy matching off. + * + * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.Metrics aggregate_metrics_exact = 5; + * @return \Google\Cloud\DocumentAI\V1\Evaluation\Metrics|null + */ + public function getAggregateMetricsExact() + { + return $this->aggregate_metrics_exact; + } + + public function hasAggregateMetricsExact() + { + return isset($this->aggregate_metrics_exact); + } + + public function clearAggregateMetricsExact() + { + unset($this->aggregate_metrics_exact); + } + + /** + * An aggregate of the statistics for the evaluation with fuzzy matching off. + * + * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.Metrics aggregate_metrics_exact = 5; + * @param \Google\Cloud\DocumentAI\V1\Evaluation\Metrics $var + * @return $this + */ + public function setAggregateMetricsExact($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Evaluation\Metrics::class); + $this->aggregate_metrics_exact = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/FetchProcessorTypesRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/FetchProcessorTypesRequest.php new file mode 100644 index 000000000000..a68624fa273e --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/FetchProcessorTypesRequest.php @@ -0,0 +1,89 @@ +google.cloud.documentai.v1.FetchProcessorTypesRequest + */ +class FetchProcessorTypesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location of processor types to list. + * Format: `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + + /** + * @param string $parent Required. The location of processor types to list. + * Format: `projects/{project}/locations/{location}`. Please see + * {@see DocumentProcessorServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\DocumentAI\V1\FetchProcessorTypesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The location of processor types to list. + * Format: `projects/{project}/locations/{location}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location of processor types to list. + * Format: `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The location of processor types to list. + * Format: `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/FetchProcessorTypesResponse.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/FetchProcessorTypesResponse.php new file mode 100644 index 000000000000..d4c03c7f883a --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/FetchProcessorTypesResponse.php @@ -0,0 +1,69 @@ +google.cloud.documentai.v1.FetchProcessorTypesResponse + */ +class FetchProcessorTypesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of processor types. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.ProcessorType processor_types = 1; + */ + private $processor_types; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\ProcessorType[] $processor_types + * The list of processor types. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * The list of processor types. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.ProcessorType processor_types = 1; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\ProcessorType> + */ + public function getProcessorTypes() + { + return $this->processor_types; + } + + /** + * The list of processor types. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.ProcessorType processor_types = 1; + * @param \Google\Cloud\DocumentAI\V1\ProcessorType[] $var + * @return $this + */ + public function setProcessorTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\ProcessorType::class); + $this->processor_types = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GcsDocument.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GcsDocument.php new file mode 100644 index 000000000000..51c9d985c9cb --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GcsDocument.php @@ -0,0 +1,101 @@ +google.cloud.documentai.v1.GcsDocument + */ +class GcsDocument extends \Google\Protobuf\Internal\Message +{ + /** + * The Cloud Storage object uri. + * + * Generated from protobuf field string gcs_uri = 1; + */ + protected $gcs_uri = ''; + /** + * An IANA MIME type (RFC6838) of the content. + * + * Generated from protobuf field string mime_type = 2; + */ + protected $mime_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $gcs_uri + * The Cloud Storage object uri. + * @type string $mime_type + * An IANA MIME type (RFC6838) of the content. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentIo::initOnce(); + parent::__construct($data); + } + + /** + * The Cloud Storage object uri. + * + * Generated from protobuf field string gcs_uri = 1; + * @return string + */ + public function getGcsUri() + { + return $this->gcs_uri; + } + + /** + * The Cloud Storage object uri. + * + * Generated from protobuf field string gcs_uri = 1; + * @param string $var + * @return $this + */ + public function setGcsUri($var) + { + GPBUtil::checkString($var, True); + $this->gcs_uri = $var; + + return $this; + } + + /** + * An IANA MIME type (RFC6838) of the content. + * + * Generated from protobuf field string mime_type = 2; + * @return string + */ + public function getMimeType() + { + return $this->mime_type; + } + + /** + * An IANA MIME type (RFC6838) of the content. + * + * Generated from protobuf field string mime_type = 2; + * @param string $var + * @return $this + */ + public function setMimeType($var) + { + GPBUtil::checkString($var, True); + $this->mime_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GcsDocuments.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GcsDocuments.php new file mode 100644 index 000000000000..48a7face7e67 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GcsDocuments.php @@ -0,0 +1,67 @@ +google.cloud.documentai.v1.GcsDocuments + */ +class GcsDocuments extends \Google\Protobuf\Internal\Message +{ + /** + * The list of documents. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.GcsDocument documents = 1; + */ + private $documents; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\GcsDocument[] $documents + * The list of documents. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentIo::initOnce(); + parent::__construct($data); + } + + /** + * The list of documents. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.GcsDocument documents = 1; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\GcsDocument> + */ + public function getDocuments() + { + return $this->documents; + } + + /** + * The list of documents. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.GcsDocument documents = 1; + * @param \Google\Cloud\DocumentAI\V1\GcsDocument[] $var + * @return $this + */ + public function setDocuments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\GcsDocument::class); + $this->documents = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GcsPrefix.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GcsPrefix.php new file mode 100644 index 000000000000..601991e8741f --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GcsPrefix.php @@ -0,0 +1,67 @@ +google.cloud.documentai.v1.GcsPrefix + */ +class GcsPrefix extends \Google\Protobuf\Internal\Message +{ + /** + * The URI prefix. + * + * Generated from protobuf field string gcs_uri_prefix = 1; + */ + protected $gcs_uri_prefix = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $gcs_uri_prefix + * The URI prefix. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentIo::initOnce(); + parent::__construct($data); + } + + /** + * The URI prefix. + * + * Generated from protobuf field string gcs_uri_prefix = 1; + * @return string + */ + public function getGcsUriPrefix() + { + return $this->gcs_uri_prefix; + } + + /** + * The URI prefix. + * + * Generated from protobuf field string gcs_uri_prefix = 1; + * @param string $var + * @return $this + */ + public function setGcsUriPrefix($var) + { + GPBUtil::checkString($var, True); + $this->gcs_uri_prefix = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetEvaluationRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetEvaluationRequest.php new file mode 100644 index 000000000000..c7a36b059c78 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetEvaluationRequest.php @@ -0,0 +1,91 @@ +google.cloud.documentai.v1.GetEvaluationRequest + */ +class GetEvaluationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the + * [Evaluation][google.cloud.documentai.v1.Evaluation] to get. + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the + * [Evaluation][google.cloud.documentai.v1.Evaluation] to get. + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` + * Please see {@see DocumentProcessorServiceClient::evaluationName()} for help formatting this field. + * + * @return \Google\Cloud\DocumentAI\V1\GetEvaluationRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the + * [Evaluation][google.cloud.documentai.v1.Evaluation] to get. + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the + * [Evaluation][google.cloud.documentai.v1.Evaluation] to get. + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the + * [Evaluation][google.cloud.documentai.v1.Evaluation] to get. + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetProcessorRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetProcessorRequest.php new file mode 100644 index 000000000000..23399c1f2f27 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetProcessorRequest.php @@ -0,0 +1,83 @@ +google.cloud.documentai.v1.GetProcessorRequest + */ +class GetProcessorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The processor resource name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The processor resource name. Please see + * {@see DocumentProcessorServiceClient::processorName()} for help formatting this field. + * + * @return \Google\Cloud\DocumentAI\V1\GetProcessorRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The processor resource name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The processor resource name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The processor resource name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetProcessorTypeRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetProcessorTypeRequest.php new file mode 100644 index 000000000000..ba99d81c0996 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetProcessorTypeRequest.php @@ -0,0 +1,83 @@ +google.cloud.documentai.v1.GetProcessorTypeRequest + */ +class GetProcessorTypeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The processor type resource name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The processor type resource name. Please see + * {@see DocumentProcessorServiceClient::processorTypeName()} for help formatting this field. + * + * @return \Google\Cloud\DocumentAI\V1\GetProcessorTypeRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The processor type resource name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The processor type resource name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The processor type resource name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetProcessorVersionRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetProcessorVersionRequest.php new file mode 100644 index 000000000000..675477af819e --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetProcessorVersionRequest.php @@ -0,0 +1,83 @@ +google.cloud.documentai.v1.GetProcessorVersionRequest + */ +class GetProcessorVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The processor resource name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The processor resource name. Please see + * {@see DocumentProcessorServiceClient::processorVersionName()} for help formatting this field. + * + * @return \Google\Cloud\DocumentAI\V1\GetProcessorVersionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The processor resource name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The processor resource name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The processor resource name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/HumanReviewStatus.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/HumanReviewStatus.php new file mode 100644 index 000000000000..f2aece70f16d --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/HumanReviewStatus.php @@ -0,0 +1,155 @@ +google.cloud.documentai.v1.HumanReviewStatus + */ +class HumanReviewStatus extends \Google\Protobuf\Internal\Message +{ + /** + * The state of human review on the processing request. + * + * Generated from protobuf field .google.cloud.documentai.v1.HumanReviewStatus.State state = 1; + */ + protected $state = 0; + /** + * A message providing more details about the human review state. + * + * Generated from protobuf field string state_message = 2; + */ + protected $state_message = ''; + /** + * The name of the operation triggered by the processed document. This field + * is populated only when the + * [state][google.cloud.documentai.v1.HumanReviewStatus.state] is + * `HUMAN_REVIEW_IN_PROGRESS`. It has the same response type and metadata as + * the long-running operation returned by + * [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument]. + * + * Generated from protobuf field string human_review_operation = 3; + */ + protected $human_review_operation = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * The state of human review on the processing request. + * @type string $state_message + * A message providing more details about the human review state. + * @type string $human_review_operation + * The name of the operation triggered by the processed document. This field + * is populated only when the + * [state][google.cloud.documentai.v1.HumanReviewStatus.state] is + * `HUMAN_REVIEW_IN_PROGRESS`. It has the same response type and metadata as + * the long-running operation returned by + * [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * The state of human review on the processing request. + * + * Generated from protobuf field .google.cloud.documentai.v1.HumanReviewStatus.State state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of human review on the processing request. + * + * Generated from protobuf field .google.cloud.documentai.v1.HumanReviewStatus.State state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\HumanReviewStatus\State::class); + $this->state = $var; + + return $this; + } + + /** + * A message providing more details about the human review state. + * + * Generated from protobuf field string state_message = 2; + * @return string + */ + public function getStateMessage() + { + return $this->state_message; + } + + /** + * A message providing more details about the human review state. + * + * Generated from protobuf field string state_message = 2; + * @param string $var + * @return $this + */ + public function setStateMessage($var) + { + GPBUtil::checkString($var, True); + $this->state_message = $var; + + return $this; + } + + /** + * The name of the operation triggered by the processed document. This field + * is populated only when the + * [state][google.cloud.documentai.v1.HumanReviewStatus.state] is + * `HUMAN_REVIEW_IN_PROGRESS`. It has the same response type and metadata as + * the long-running operation returned by + * [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument]. + * + * Generated from protobuf field string human_review_operation = 3; + * @return string + */ + public function getHumanReviewOperation() + { + return $this->human_review_operation; + } + + /** + * The name of the operation triggered by the processed document. This field + * is populated only when the + * [state][google.cloud.documentai.v1.HumanReviewStatus.state] is + * `HUMAN_REVIEW_IN_PROGRESS`. It has the same response type and metadata as + * the long-running operation returned by + * [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument]. + * + * Generated from protobuf field string human_review_operation = 3; + * @param string $var + * @return $this + */ + public function setHumanReviewOperation($var) + { + GPBUtil::checkString($var, True); + $this->human_review_operation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/HumanReviewStatus/State.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/HumanReviewStatus/State.php new file mode 100644 index 000000000000..3283c2f4b942 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/HumanReviewStatus/State.php @@ -0,0 +1,79 @@ +google.cloud.documentai.v1.HumanReviewStatus.State + */ +class State +{ + /** + * Human review state is unspecified. Most likely due to an internal error. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Human review is skipped for the document. This can happen because human + * review isn't enabled on the processor or the processing request has + * been set to skip this document. + * + * Generated from protobuf enum SKIPPED = 1; + */ + const SKIPPED = 1; + /** + * Human review validation is triggered and passed, so no review is needed. + * + * Generated from protobuf enum VALIDATION_PASSED = 2; + */ + const VALIDATION_PASSED = 2; + /** + * Human review validation is triggered and the document is under review. + * + * Generated from protobuf enum IN_PROGRESS = 3; + */ + const IN_PROGRESS = 3; + /** + * Some error happened during triggering human review, see the + * [state_message][google.cloud.documentai.v1.HumanReviewStatus.state_message] + * for details. + * + * Generated from protobuf enum ERROR = 4; + */ + const ERROR = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::SKIPPED => 'SKIPPED', + self::VALIDATION_PASSED => 'VALIDATION_PASSED', + self::IN_PROGRESS => 'IN_PROGRESS', + self::ERROR => 'ERROR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListEvaluationsRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListEvaluationsRequest.php new file mode 100644 index 000000000000..085fc8d59a99 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListEvaluationsRequest.php @@ -0,0 +1,177 @@ +google.cloud.documentai.v1.ListEvaluationsRequest + */ +class ListEvaluationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list + * evaluations for. + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The standard list page size. + * If unspecified, at most `5` evaluations are returned. + * The maximum value is `100`. Values above `100` are coerced to `100`. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListEvaluations` call. + * Provide this to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The resource name of the + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list + * evaluations for. + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + * Please see {@see DocumentProcessorServiceClient::processorVersionName()} for help formatting this field. + * + * @return \Google\Cloud\DocumentAI\V1\ListEvaluationsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list + * evaluations for. + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + * @type int $page_size + * The standard list page size. + * If unspecified, at most `5` evaluations are returned. + * The maximum value is `100`. Values above `100` are coerced to `100`. + * @type string $page_token + * A page token, received from a previous `ListEvaluations` call. + * Provide this to retrieve the subsequent page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list + * evaluations for. + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list + * evaluations for. + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The standard list page size. + * If unspecified, at most `5` evaluations are returned. + * The maximum value is `100`. Values above `100` are coerced to `100`. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The standard list page size. + * If unspecified, at most `5` evaluations are returned. + * The maximum value is `100`. Values above `100` are coerced to `100`. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from a previous `ListEvaluations` call. + * Provide this to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ListEvaluations` call. + * Provide this to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListEvaluationsResponse.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListEvaluationsResponse.php new file mode 100644 index 000000000000..793f277d20aa --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListEvaluationsResponse.php @@ -0,0 +1,105 @@ +google.cloud.documentai.v1.ListEvaluationsResponse + */ +class ListEvaluationsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The evaluations requested. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Evaluation evaluations = 1; + */ + private $evaluations; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Evaluation[] $evaluations + * The evaluations requested. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * The evaluations requested. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Evaluation evaluations = 1; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Evaluation> + */ + public function getEvaluations() + { + return $this->evaluations; + } + + /** + * The evaluations requested. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Evaluation evaluations = 1; + * @param \Google\Cloud\DocumentAI\V1\Evaluation[] $var + * @return $this + */ + public function setEvaluations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Evaluation::class); + $this->evaluations = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorTypesRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorTypesRequest.php new file mode 100644 index 000000000000..85769fb81a83 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorTypesRequest.php @@ -0,0 +1,165 @@ +google.cloud.documentai.v1.ListProcessorTypesRequest + */ +class ListProcessorTypesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location of processor types to list. + * Format: `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of processor types to return. + * If unspecified, at most `100` processor types will be returned. + * The maximum value is `500`. Values above `500` will be coerced to `500`. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Used to retrieve the next page of results, empty if at the end of the list. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The location of processor types to list. + * Format: `projects/{project}/locations/{location}`. Please see + * {@see DocumentProcessorServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\DocumentAI\V1\ListProcessorTypesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The location of processor types to list. + * Format: `projects/{project}/locations/{location}`. + * @type int $page_size + * The maximum number of processor types to return. + * If unspecified, at most `100` processor types will be returned. + * The maximum value is `500`. Values above `500` will be coerced to `500`. + * @type string $page_token + * Used to retrieve the next page of results, empty if at the end of the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location of processor types to list. + * Format: `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The location of processor types to list. + * Format: `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of processor types to return. + * If unspecified, at most `100` processor types will be returned. + * The maximum value is `500`. Values above `500` will be coerced to `500`. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of processor types to return. + * If unspecified, at most `100` processor types will be returned. + * The maximum value is `500`. Values above `500` will be coerced to `500`. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Used to retrieve the next page of results, empty if at the end of the list. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Used to retrieve the next page of results, empty if at the end of the list. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorTypesResponse.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorTypesResponse.php new file mode 100644 index 000000000000..dd14156a4cab --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorTypesResponse.php @@ -0,0 +1,103 @@ +google.cloud.documentai.v1.ListProcessorTypesResponse + */ +class ListProcessorTypesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The processor types. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.ProcessorType processor_types = 1; + */ + private $processor_types; + /** + * Points to the next page, otherwise empty. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\ProcessorType[] $processor_types + * The processor types. + * @type string $next_page_token + * Points to the next page, otherwise empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * The processor types. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.ProcessorType processor_types = 1; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\ProcessorType> + */ + public function getProcessorTypes() + { + return $this->processor_types; + } + + /** + * The processor types. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.ProcessorType processor_types = 1; + * @param \Google\Cloud\DocumentAI\V1\ProcessorType[] $var + * @return $this + */ + public function setProcessorTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\ProcessorType::class); + $this->processor_types = $arr; + + return $this; + } + + /** + * Points to the next page, otherwise empty. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Points to the next page, otherwise empty. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorVersionsRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorVersionsRequest.php new file mode 100644 index 000000000000..8fdec0920123 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorVersionsRequest.php @@ -0,0 +1,171 @@ +google.cloud.documentai.v1.ListProcessorVersionsRequest + */ +class ListProcessorVersionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent (project, location and processor) to list all + * versions. Format: + * `projects/{project}/locations/{location}/processors/{processor}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of processor versions to return. + * If unspecified, at most `10` processor versions will be returned. + * The maximum value is `20`. Values above `20` will be coerced to `20`. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * We will return the processor versions sorted by creation time. The page + * token will point to the next processor version. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent (project, location and processor) to list all + * versions. Format: + * `projects/{project}/locations/{location}/processors/{processor}` + * Please see {@see DocumentProcessorServiceClient::processorName()} for help formatting this field. + * + * @return \Google\Cloud\DocumentAI\V1\ListProcessorVersionsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent (project, location and processor) to list all + * versions. Format: + * `projects/{project}/locations/{location}/processors/{processor}` + * @type int $page_size + * The maximum number of processor versions to return. + * If unspecified, at most `10` processor versions will be returned. + * The maximum value is `20`. Values above `20` will be coerced to `20`. + * @type string $page_token + * We will return the processor versions sorted by creation time. The page + * token will point to the next processor version. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent (project, location and processor) to list all + * versions. Format: + * `projects/{project}/locations/{location}/processors/{processor}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent (project, location and processor) to list all + * versions. Format: + * `projects/{project}/locations/{location}/processors/{processor}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of processor versions to return. + * If unspecified, at most `10` processor versions will be returned. + * The maximum value is `20`. Values above `20` will be coerced to `20`. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of processor versions to return. + * If unspecified, at most `10` processor versions will be returned. + * The maximum value is `20`. Values above `20` will be coerced to `20`. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * We will return the processor versions sorted by creation time. The page + * token will point to the next processor version. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * We will return the processor versions sorted by creation time. The page + * token will point to the next processor version. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorVersionsResponse.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorVersionsResponse.php new file mode 100644 index 000000000000..9b40f74443cb --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorVersionsResponse.php @@ -0,0 +1,103 @@ +google.cloud.documentai.v1.ListProcessorVersionsResponse + */ +class ListProcessorVersionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of processors. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.ProcessorVersion processor_versions = 1; + */ + private $processor_versions; + /** + * Points to the next processor, otherwise empty. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\ProcessorVersion[] $processor_versions + * The list of processors. + * @type string $next_page_token + * Points to the next processor, otherwise empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * The list of processors. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.ProcessorVersion processor_versions = 1; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\ProcessorVersion> + */ + public function getProcessorVersions() + { + return $this->processor_versions; + } + + /** + * The list of processors. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.ProcessorVersion processor_versions = 1; + * @param \Google\Cloud\DocumentAI\V1\ProcessorVersion[] $var + * @return $this + */ + public function setProcessorVersions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\ProcessorVersion::class); + $this->processor_versions = $arr; + + return $this; + } + + /** + * Points to the next processor, otherwise empty. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Points to the next processor, otherwise empty. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorsRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorsRequest.php new file mode 100644 index 000000000000..0c658b1c9a10 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorsRequest.php @@ -0,0 +1,166 @@ +google.cloud.documentai.v1.ListProcessorsRequest + */ +class ListProcessorsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent (project and location) which owns this collection of + * Processors. Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of processors to return. + * If unspecified, at most `50` processors will be returned. + * The maximum value is `100`. Values above `100` will be coerced to `100`. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * We will return the processors sorted by creation time. The page token + * will point to the next processor. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent (project and location) which owns this collection of + * Processors. Format: `projects/{project}/locations/{location}` + * Please see {@see DocumentProcessorServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\DocumentAI\V1\ListProcessorsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent (project and location) which owns this collection of + * Processors. Format: `projects/{project}/locations/{location}` + * @type int $page_size + * The maximum number of processors to return. + * If unspecified, at most `50` processors will be returned. + * The maximum value is `100`. Values above `100` will be coerced to `100`. + * @type string $page_token + * We will return the processors sorted by creation time. The page token + * will point to the next processor. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent (project and location) which owns this collection of + * Processors. Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent (project and location) which owns this collection of + * Processors. Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of processors to return. + * If unspecified, at most `50` processors will be returned. + * The maximum value is `100`. Values above `100` will be coerced to `100`. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of processors to return. + * If unspecified, at most `50` processors will be returned. + * The maximum value is `100`. Values above `100` will be coerced to `100`. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * We will return the processors sorted by creation time. The page token + * will point to the next processor. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * We will return the processors sorted by creation time. The page token + * will point to the next processor. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorsResponse.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorsResponse.php new file mode 100644 index 000000000000..7ae4aca0c019 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorsResponse.php @@ -0,0 +1,103 @@ +google.cloud.documentai.v1.ListProcessorsResponse + */ +class ListProcessorsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of processors. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Processor processors = 1; + */ + private $processors; + /** + * Points to the next processor, otherwise empty. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Processor[] $processors + * The list of processors. + * @type string $next_page_token + * Points to the next processor, otherwise empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * The list of processors. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Processor processors = 1; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Processor> + */ + public function getProcessors() + { + return $this->processors; + } + + /** + * The list of processors. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Processor processors = 1; + * @param \Google\Cloud\DocumentAI\V1\Processor[] $var + * @return $this + */ + public function setProcessors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Processor::class); + $this->processors = $arr; + + return $this; + } + + /** + * Points to the next processor, otherwise empty. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Points to the next processor, otherwise empty. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/NormalizedVertex.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/NormalizedVertex.php new file mode 100644 index 000000000000..858c6080256a --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/NormalizedVertex.php @@ -0,0 +1,103 @@ +google.cloud.documentai.v1.NormalizedVertex + */ +class NormalizedVertex extends \Google\Protobuf\Internal\Message +{ + /** + * X coordinate. + * + * Generated from protobuf field float x = 1; + */ + protected $x = 0.0; + /** + * Y coordinate (starts from the top of the image). + * + * Generated from protobuf field float y = 2; + */ + protected $y = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $x + * X coordinate. + * @type float $y + * Y coordinate (starts from the top of the image). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Geometry::initOnce(); + parent::__construct($data); + } + + /** + * X coordinate. + * + * Generated from protobuf field float x = 1; + * @return float + */ + public function getX() + { + return $this->x; + } + + /** + * X coordinate. + * + * Generated from protobuf field float x = 1; + * @param float $var + * @return $this + */ + public function setX($var) + { + GPBUtil::checkFloat($var); + $this->x = $var; + + return $this; + } + + /** + * Y coordinate (starts from the top of the image). + * + * Generated from protobuf field float y = 2; + * @return float + */ + public function getY() + { + return $this->y; + } + + /** + * Y coordinate (starts from the top of the image). + * + * Generated from protobuf field float y = 2; + * @param float $var + * @return $this + */ + public function setY($var) + { + GPBUtil::checkFloat($var); + $this->y = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/OcrConfig.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/OcrConfig.php new file mode 100644 index 000000000000..67d0a0d2536f --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/OcrConfig.php @@ -0,0 +1,380 @@ +google.cloud.documentai.v1.OcrConfig + */ +class OcrConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Hints for the OCR model. + * + * Generated from protobuf field .google.cloud.documentai.v1.OcrConfig.Hints hints = 2; + */ + protected $hints = null; + /** + * Enables special handling for PDFs with existing text information. Results + * in better text extraction quality in such PDF inputs. + * + * Generated from protobuf field bool enable_native_pdf_parsing = 3; + */ + protected $enable_native_pdf_parsing = false; + /** + * Enables intelligent document quality scores after OCR. Can help with + * diagnosing why OCR responses are of poor quality for a given input. + * Adds additional latency comparable to regular OCR to the process call. + * + * Generated from protobuf field bool enable_image_quality_scores = 4; + */ + protected $enable_image_quality_scores = false; + /** + * A list of advanced OCR options to further fine-tune OCR behavior. Current + * valid values are: + * - `legacy_layout`: a heuristics layout detection algorithm, which serves as + * an alternative to the current ML-based layout detection algorithm. + * Customers can choose the best suitable layout algorithm based on their + * situation. + * + * Generated from protobuf field repeated string advanced_ocr_options = 5; + */ + private $advanced_ocr_options; + /** + * Includes symbol level OCR information if set to true. + * + * Generated from protobuf field bool enable_symbol = 6; + */ + protected $enable_symbol = false; + /** + * Turn on font identification model and return font style information. + * Deprecated, use + * [PremiumFeatures.compute_style_info][google.cloud.documentai.v1.OcrConfig.PremiumFeatures.compute_style_info] + * instead. + * + * Generated from protobuf field bool compute_style_info = 8 [deprecated = true]; + * @deprecated + */ + protected $compute_style_info = false; + /** + * Turn off character box detector in OCR engine. Character box detection is + * enabled by default in OCR 2.0 (and later) processors. + * + * Generated from protobuf field bool disable_character_boxes_detection = 10; + */ + protected $disable_character_boxes_detection = false; + /** + * Configurations for premium OCR features. + * + * Generated from protobuf field .google.cloud.documentai.v1.OcrConfig.PremiumFeatures premium_features = 11; + */ + protected $premium_features = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\OcrConfig\Hints $hints + * Hints for the OCR model. + * @type bool $enable_native_pdf_parsing + * Enables special handling for PDFs with existing text information. Results + * in better text extraction quality in such PDF inputs. + * @type bool $enable_image_quality_scores + * Enables intelligent document quality scores after OCR. Can help with + * diagnosing why OCR responses are of poor quality for a given input. + * Adds additional latency comparable to regular OCR to the process call. + * @type string[] $advanced_ocr_options + * A list of advanced OCR options to further fine-tune OCR behavior. Current + * valid values are: + * - `legacy_layout`: a heuristics layout detection algorithm, which serves as + * an alternative to the current ML-based layout detection algorithm. + * Customers can choose the best suitable layout algorithm based on their + * situation. + * @type bool $enable_symbol + * Includes symbol level OCR information if set to true. + * @type bool $compute_style_info + * Turn on font identification model and return font style information. + * Deprecated, use + * [PremiumFeatures.compute_style_info][google.cloud.documentai.v1.OcrConfig.PremiumFeatures.compute_style_info] + * instead. + * @type bool $disable_character_boxes_detection + * Turn off character box detector in OCR engine. Character box detection is + * enabled by default in OCR 2.0 (and later) processors. + * @type \Google\Cloud\DocumentAI\V1\OcrConfig\PremiumFeatures $premium_features + * Configurations for premium OCR features. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentIo::initOnce(); + parent::__construct($data); + } + + /** + * Hints for the OCR model. + * + * Generated from protobuf field .google.cloud.documentai.v1.OcrConfig.Hints hints = 2; + * @return \Google\Cloud\DocumentAI\V1\OcrConfig\Hints|null + */ + public function getHints() + { + return $this->hints; + } + + public function hasHints() + { + return isset($this->hints); + } + + public function clearHints() + { + unset($this->hints); + } + + /** + * Hints for the OCR model. + * + * Generated from protobuf field .google.cloud.documentai.v1.OcrConfig.Hints hints = 2; + * @param \Google\Cloud\DocumentAI\V1\OcrConfig\Hints $var + * @return $this + */ + public function setHints($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\OcrConfig\Hints::class); + $this->hints = $var; + + return $this; + } + + /** + * Enables special handling for PDFs with existing text information. Results + * in better text extraction quality in such PDF inputs. + * + * Generated from protobuf field bool enable_native_pdf_parsing = 3; + * @return bool + */ + public function getEnableNativePdfParsing() + { + return $this->enable_native_pdf_parsing; + } + + /** + * Enables special handling for PDFs with existing text information. Results + * in better text extraction quality in such PDF inputs. + * + * Generated from protobuf field bool enable_native_pdf_parsing = 3; + * @param bool $var + * @return $this + */ + public function setEnableNativePdfParsing($var) + { + GPBUtil::checkBool($var); + $this->enable_native_pdf_parsing = $var; + + return $this; + } + + /** + * Enables intelligent document quality scores after OCR. Can help with + * diagnosing why OCR responses are of poor quality for a given input. + * Adds additional latency comparable to regular OCR to the process call. + * + * Generated from protobuf field bool enable_image_quality_scores = 4; + * @return bool + */ + public function getEnableImageQualityScores() + { + return $this->enable_image_quality_scores; + } + + /** + * Enables intelligent document quality scores after OCR. Can help with + * diagnosing why OCR responses are of poor quality for a given input. + * Adds additional latency comparable to regular OCR to the process call. + * + * Generated from protobuf field bool enable_image_quality_scores = 4; + * @param bool $var + * @return $this + */ + public function setEnableImageQualityScores($var) + { + GPBUtil::checkBool($var); + $this->enable_image_quality_scores = $var; + + return $this; + } + + /** + * A list of advanced OCR options to further fine-tune OCR behavior. Current + * valid values are: + * - `legacy_layout`: a heuristics layout detection algorithm, which serves as + * an alternative to the current ML-based layout detection algorithm. + * Customers can choose the best suitable layout algorithm based on their + * situation. + * + * Generated from protobuf field repeated string advanced_ocr_options = 5; + * @return RepeatedField + */ + public function getAdvancedOcrOptions() + { + return $this->advanced_ocr_options; + } + + /** + * A list of advanced OCR options to further fine-tune OCR behavior. Current + * valid values are: + * - `legacy_layout`: a heuristics layout detection algorithm, which serves as + * an alternative to the current ML-based layout detection algorithm. + * Customers can choose the best suitable layout algorithm based on their + * situation. + * + * Generated from protobuf field repeated string advanced_ocr_options = 5; + * @param string[] $var + * @return $this + */ + public function setAdvancedOcrOptions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->advanced_ocr_options = $arr; + + return $this; + } + + /** + * Includes symbol level OCR information if set to true. + * + * Generated from protobuf field bool enable_symbol = 6; + * @return bool + */ + public function getEnableSymbol() + { + return $this->enable_symbol; + } + + /** + * Includes symbol level OCR information if set to true. + * + * Generated from protobuf field bool enable_symbol = 6; + * @param bool $var + * @return $this + */ + public function setEnableSymbol($var) + { + GPBUtil::checkBool($var); + $this->enable_symbol = $var; + + return $this; + } + + /** + * Turn on font identification model and return font style information. + * Deprecated, use + * [PremiumFeatures.compute_style_info][google.cloud.documentai.v1.OcrConfig.PremiumFeatures.compute_style_info] + * instead. + * + * Generated from protobuf field bool compute_style_info = 8 [deprecated = true]; + * @return bool + * @deprecated + */ + public function getComputeStyleInfo() + { + if ($this->compute_style_info !== false) { + @trigger_error('compute_style_info is deprecated.', E_USER_DEPRECATED); + } + return $this->compute_style_info; + } + + /** + * Turn on font identification model and return font style information. + * Deprecated, use + * [PremiumFeatures.compute_style_info][google.cloud.documentai.v1.OcrConfig.PremiumFeatures.compute_style_info] + * instead. + * + * Generated from protobuf field bool compute_style_info = 8 [deprecated = true]; + * @param bool $var + * @return $this + * @deprecated + */ + public function setComputeStyleInfo($var) + { + @trigger_error('compute_style_info is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkBool($var); + $this->compute_style_info = $var; + + return $this; + } + + /** + * Turn off character box detector in OCR engine. Character box detection is + * enabled by default in OCR 2.0 (and later) processors. + * + * Generated from protobuf field bool disable_character_boxes_detection = 10; + * @return bool + */ + public function getDisableCharacterBoxesDetection() + { + return $this->disable_character_boxes_detection; + } + + /** + * Turn off character box detector in OCR engine. Character box detection is + * enabled by default in OCR 2.0 (and later) processors. + * + * Generated from protobuf field bool disable_character_boxes_detection = 10; + * @param bool $var + * @return $this + */ + public function setDisableCharacterBoxesDetection($var) + { + GPBUtil::checkBool($var); + $this->disable_character_boxes_detection = $var; + + return $this; + } + + /** + * Configurations for premium OCR features. + * + * Generated from protobuf field .google.cloud.documentai.v1.OcrConfig.PremiumFeatures premium_features = 11; + * @return \Google\Cloud\DocumentAI\V1\OcrConfig\PremiumFeatures|null + */ + public function getPremiumFeatures() + { + return $this->premium_features; + } + + public function hasPremiumFeatures() + { + return isset($this->premium_features); + } + + public function clearPremiumFeatures() + { + unset($this->premium_features); + } + + /** + * Configurations for premium OCR features. + * + * Generated from protobuf field .google.cloud.documentai.v1.OcrConfig.PremiumFeatures premium_features = 11; + * @param \Google\Cloud\DocumentAI\V1\OcrConfig\PremiumFeatures $var + * @return $this + */ + public function setPremiumFeatures($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\OcrConfig\PremiumFeatures::class); + $this->premium_features = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/OcrConfig/Hints.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/OcrConfig/Hints.php new file mode 100644 index 000000000000..919aa6ca9987 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/OcrConfig/Hints.php @@ -0,0 +1,87 @@ +google.cloud.documentai.v1.OcrConfig.Hints + */ +class Hints extends \Google\Protobuf\Internal\Message +{ + /** + * List of BCP-47 language codes to use for OCR. In most cases, not + * specifying it yields the best results since it enables automatic language + * detection. For languages based on the Latin alphabet, setting hints is + * not needed. In rare cases, when the language of the text in the + * image is known, setting a hint will help get better results (although it + * will be a significant hindrance if the hint is wrong). + * + * Generated from protobuf field repeated string language_hints = 1; + */ + private $language_hints; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[] $language_hints + * List of BCP-47 language codes to use for OCR. In most cases, not + * specifying it yields the best results since it enables automatic language + * detection. For languages based on the Latin alphabet, setting hints is + * not needed. In rare cases, when the language of the text in the + * image is known, setting a hint will help get better results (although it + * will be a significant hindrance if the hint is wrong). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentIo::initOnce(); + parent::__construct($data); + } + + /** + * List of BCP-47 language codes to use for OCR. In most cases, not + * specifying it yields the best results since it enables automatic language + * detection. For languages based on the Latin alphabet, setting hints is + * not needed. In rare cases, when the language of the text in the + * image is known, setting a hint will help get better results (although it + * will be a significant hindrance if the hint is wrong). + * + * Generated from protobuf field repeated string language_hints = 1; + * @return RepeatedField + */ + public function getLanguageHints() + { + return $this->language_hints; + } + + /** + * List of BCP-47 language codes to use for OCR. In most cases, not + * specifying it yields the best results since it enables automatic language + * detection. For languages based on the Latin alphabet, setting hints is + * not needed. In rare cases, when the language of the text in the + * image is known, setting a hint will help get better results (although it + * will be a significant hindrance if the hint is wrong). + * + * Generated from protobuf field repeated string language_hints = 1; + * @param string[] $var + * @return $this + */ + public function setLanguageHints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->language_hints = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/OcrConfig/PremiumFeatures.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/OcrConfig/PremiumFeatures.php new file mode 100644 index 000000000000..5e00760eea69 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/OcrConfig/PremiumFeatures.php @@ -0,0 +1,139 @@ +google.cloud.documentai.v1.OcrConfig.PremiumFeatures + */ +class PremiumFeatures extends \Google\Protobuf\Internal\Message +{ + /** + * Turn on selection mark detector in OCR engine. Only available in OCR 2.0 + * (and later) processors. + * + * Generated from protobuf field bool enable_selection_mark_detection = 3; + */ + protected $enable_selection_mark_detection = false; + /** + * Turn on font identification model and return font style information. + * + * Generated from protobuf field bool compute_style_info = 4; + */ + protected $compute_style_info = false; + /** + * Turn on the model that can extract LaTeX math formulas. + * + * Generated from protobuf field bool enable_math_ocr = 5; + */ + protected $enable_math_ocr = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable_selection_mark_detection + * Turn on selection mark detector in OCR engine. Only available in OCR 2.0 + * (and later) processors. + * @type bool $compute_style_info + * Turn on font identification model and return font style information. + * @type bool $enable_math_ocr + * Turn on the model that can extract LaTeX math formulas. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentIo::initOnce(); + parent::__construct($data); + } + + /** + * Turn on selection mark detector in OCR engine. Only available in OCR 2.0 + * (and later) processors. + * + * Generated from protobuf field bool enable_selection_mark_detection = 3; + * @return bool + */ + public function getEnableSelectionMarkDetection() + { + return $this->enable_selection_mark_detection; + } + + /** + * Turn on selection mark detector in OCR engine. Only available in OCR 2.0 + * (and later) processors. + * + * Generated from protobuf field bool enable_selection_mark_detection = 3; + * @param bool $var + * @return $this + */ + public function setEnableSelectionMarkDetection($var) + { + GPBUtil::checkBool($var); + $this->enable_selection_mark_detection = $var; + + return $this; + } + + /** + * Turn on font identification model and return font style information. + * + * Generated from protobuf field bool compute_style_info = 4; + * @return bool + */ + public function getComputeStyleInfo() + { + return $this->compute_style_info; + } + + /** + * Turn on font identification model and return font style information. + * + * Generated from protobuf field bool compute_style_info = 4; + * @param bool $var + * @return $this + */ + public function setComputeStyleInfo($var) + { + GPBUtil::checkBool($var); + $this->compute_style_info = $var; + + return $this; + } + + /** + * Turn on the model that can extract LaTeX math formulas. + * + * Generated from protobuf field bool enable_math_ocr = 5; + * @return bool + */ + public function getEnableMathOcr() + { + return $this->enable_math_ocr; + } + + /** + * Turn on the model that can extract LaTeX math formulas. + * + * Generated from protobuf field bool enable_math_ocr = 5; + * @param bool $var + * @return $this + */ + public function setEnableMathOcr($var) + { + GPBUtil::checkBool($var); + $this->enable_math_ocr = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions.php new file mode 100644 index 000000000000..4a117eef08f7 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions.php @@ -0,0 +1,300 @@ +google.cloud.documentai.v1.ProcessOptions + */ +class ProcessOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Only applicable to `OCR_PROCESSOR` and `FORM_PARSER_PROCESSOR`. + * Returns error if set on other processor types. + * + * Generated from protobuf field .google.cloud.documentai.v1.OcrConfig ocr_config = 1; + */ + protected $ocr_config = null; + /** + * Optional. Only applicable to `LAYOUT_PARSER_PROCESSOR`. + * Returns error if set on other processor types. + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessOptions.LayoutConfig layout_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $layout_config = null; + /** + * Optional. Override the schema of the + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. Will + * return an Invalid Argument error if this field is set when the underlying + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] doesn't + * support schema override. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema schema_override = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $schema_override = null; + protected $page_range; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\ProcessOptions\IndividualPageSelector $individual_page_selector + * Which pages to process (1-indexed). + * @type int $from_start + * Only process certain pages from the start. Process all if the document + * has fewer pages. + * @type int $from_end + * Only process certain pages from the end, same as above. + * @type \Google\Cloud\DocumentAI\V1\OcrConfig $ocr_config + * Only applicable to `OCR_PROCESSOR` and `FORM_PARSER_PROCESSOR`. + * Returns error if set on other processor types. + * @type \Google\Cloud\DocumentAI\V1\ProcessOptions\LayoutConfig $layout_config + * Optional. Only applicable to `LAYOUT_PARSER_PROCESSOR`. + * Returns error if set on other processor types. + * @type \Google\Cloud\DocumentAI\V1\DocumentSchema $schema_override + * Optional. Override the schema of the + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. Will + * return an Invalid Argument error if this field is set when the underlying + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] doesn't + * support schema override. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * Which pages to process (1-indexed). + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessOptions.IndividualPageSelector individual_page_selector = 5; + * @return \Google\Cloud\DocumentAI\V1\ProcessOptions\IndividualPageSelector|null + */ + public function getIndividualPageSelector() + { + return $this->readOneof(5); + } + + public function hasIndividualPageSelector() + { + return $this->hasOneof(5); + } + + /** + * Which pages to process (1-indexed). + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessOptions.IndividualPageSelector individual_page_selector = 5; + * @param \Google\Cloud\DocumentAI\V1\ProcessOptions\IndividualPageSelector $var + * @return $this + */ + public function setIndividualPageSelector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\ProcessOptions\IndividualPageSelector::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Only process certain pages from the start. Process all if the document + * has fewer pages. + * + * Generated from protobuf field int32 from_start = 6; + * @return int + */ + public function getFromStart() + { + return $this->readOneof(6); + } + + public function hasFromStart() + { + return $this->hasOneof(6); + } + + /** + * Only process certain pages from the start. Process all if the document + * has fewer pages. + * + * Generated from protobuf field int32 from_start = 6; + * @param int $var + * @return $this + */ + public function setFromStart($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Only process certain pages from the end, same as above. + * + * Generated from protobuf field int32 from_end = 7; + * @return int + */ + public function getFromEnd() + { + return $this->readOneof(7); + } + + public function hasFromEnd() + { + return $this->hasOneof(7); + } + + /** + * Only process certain pages from the end, same as above. + * + * Generated from protobuf field int32 from_end = 7; + * @param int $var + * @return $this + */ + public function setFromEnd($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Only applicable to `OCR_PROCESSOR` and `FORM_PARSER_PROCESSOR`. + * Returns error if set on other processor types. + * + * Generated from protobuf field .google.cloud.documentai.v1.OcrConfig ocr_config = 1; + * @return \Google\Cloud\DocumentAI\V1\OcrConfig|null + */ + public function getOcrConfig() + { + return $this->ocr_config; + } + + public function hasOcrConfig() + { + return isset($this->ocr_config); + } + + public function clearOcrConfig() + { + unset($this->ocr_config); + } + + /** + * Only applicable to `OCR_PROCESSOR` and `FORM_PARSER_PROCESSOR`. + * Returns error if set on other processor types. + * + * Generated from protobuf field .google.cloud.documentai.v1.OcrConfig ocr_config = 1; + * @param \Google\Cloud\DocumentAI\V1\OcrConfig $var + * @return $this + */ + public function setOcrConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\OcrConfig::class); + $this->ocr_config = $var; + + return $this; + } + + /** + * Optional. Only applicable to `LAYOUT_PARSER_PROCESSOR`. + * Returns error if set on other processor types. + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessOptions.LayoutConfig layout_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\DocumentAI\V1\ProcessOptions\LayoutConfig|null + */ + public function getLayoutConfig() + { + return $this->layout_config; + } + + public function hasLayoutConfig() + { + return isset($this->layout_config); + } + + public function clearLayoutConfig() + { + unset($this->layout_config); + } + + /** + * Optional. Only applicable to `LAYOUT_PARSER_PROCESSOR`. + * Returns error if set on other processor types. + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessOptions.LayoutConfig layout_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\DocumentAI\V1\ProcessOptions\LayoutConfig $var + * @return $this + */ + public function setLayoutConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\ProcessOptions\LayoutConfig::class); + $this->layout_config = $var; + + return $this; + } + + /** + * Optional. Override the schema of the + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. Will + * return an Invalid Argument error if this field is set when the underlying + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] doesn't + * support schema override. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema schema_override = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\DocumentAI\V1\DocumentSchema|null + */ + public function getSchemaOverride() + { + return $this->schema_override; + } + + public function hasSchemaOverride() + { + return isset($this->schema_override); + } + + public function clearSchemaOverride() + { + unset($this->schema_override); + } + + /** + * Optional. Override the schema of the + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. Will + * return an Invalid Argument error if this field is set when the underlying + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] doesn't + * support schema override. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema schema_override = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\DocumentAI\V1\DocumentSchema $var + * @return $this + */ + public function setSchemaOverride($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\DocumentSchema::class); + $this->schema_override = $var; + + return $this; + } + + /** + * @return string + */ + public function getPageRange() + { + return $this->whichOneof("page_range"); + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions/IndividualPageSelector.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions/IndividualPageSelector.php new file mode 100644 index 000000000000..710a5d25c66b --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions/IndividualPageSelector.php @@ -0,0 +1,67 @@ +google.cloud.documentai.v1.ProcessOptions.IndividualPageSelector + */ +class IndividualPageSelector extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Indices of the pages (starting from 1). + * + * Generated from protobuf field repeated int32 pages = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $pages; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int[] $pages + * Optional. Indices of the pages (starting from 1). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Indices of the pages (starting from 1). + * + * Generated from protobuf field repeated int32 pages = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getPages() + { + return $this->pages; + } + + /** + * Optional. Indices of the pages (starting from 1). + * + * Generated from protobuf field repeated int32 pages = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int[] $var + * @return $this + */ + public function setPages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->pages = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions/LayoutConfig.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions/LayoutConfig.php new file mode 100644 index 000000000000..e7e7ee9a2e2a --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions/LayoutConfig.php @@ -0,0 +1,217 @@ +google.cloud.documentai.v1.ProcessOptions.LayoutConfig + */ +class LayoutConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Config for chunking in layout parser processor. + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessOptions.LayoutConfig.ChunkingConfig chunking_config = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $chunking_config = null; + /** + * Optional. Whether to include images in layout parser processor response. + * + * Generated from protobuf field bool return_images = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $return_images = false; + /** + * Optional. Whether to include bounding boxes in layout parser processor + * response. + * + * Generated from protobuf field bool return_bounding_boxes = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $return_bounding_boxes = false; + /** + * Optional. Whether to include image annotations in layout parser response. + * + * Generated from protobuf field bool enable_image_annotation = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_image_annotation = false; + /** + * Optional. Whether to include table annotations in layout parser response. + * + * Generated from protobuf field bool enable_table_annotation = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_table_annotation = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\ProcessOptions\LayoutConfig\ChunkingConfig $chunking_config + * Optional. Config for chunking in layout parser processor. + * @type bool $return_images + * Optional. Whether to include images in layout parser processor response. + * @type bool $return_bounding_boxes + * Optional. Whether to include bounding boxes in layout parser processor + * response. + * @type bool $enable_image_annotation + * Optional. Whether to include image annotations in layout parser response. + * @type bool $enable_table_annotation + * Optional. Whether to include table annotations in layout parser response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Config for chunking in layout parser processor. + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessOptions.LayoutConfig.ChunkingConfig chunking_config = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\DocumentAI\V1\ProcessOptions\LayoutConfig\ChunkingConfig|null + */ + public function getChunkingConfig() + { + return $this->chunking_config; + } + + public function hasChunkingConfig() + { + return isset($this->chunking_config); + } + + public function clearChunkingConfig() + { + unset($this->chunking_config); + } + + /** + * Optional. Config for chunking in layout parser processor. + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessOptions.LayoutConfig.ChunkingConfig chunking_config = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\DocumentAI\V1\ProcessOptions\LayoutConfig\ChunkingConfig $var + * @return $this + */ + public function setChunkingConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\ProcessOptions\LayoutConfig\ChunkingConfig::class); + $this->chunking_config = $var; + + return $this; + } + + /** + * Optional. Whether to include images in layout parser processor response. + * + * Generated from protobuf field bool return_images = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getReturnImages() + { + return $this->return_images; + } + + /** + * Optional. Whether to include images in layout parser processor response. + * + * Generated from protobuf field bool return_images = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setReturnImages($var) + { + GPBUtil::checkBool($var); + $this->return_images = $var; + + return $this; + } + + /** + * Optional. Whether to include bounding boxes in layout parser processor + * response. + * + * Generated from protobuf field bool return_bounding_boxes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getReturnBoundingBoxes() + { + return $this->return_bounding_boxes; + } + + /** + * Optional. Whether to include bounding boxes in layout parser processor + * response. + * + * Generated from protobuf field bool return_bounding_boxes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setReturnBoundingBoxes($var) + { + GPBUtil::checkBool($var); + $this->return_bounding_boxes = $var; + + return $this; + } + + /** + * Optional. Whether to include image annotations in layout parser response. + * + * Generated from protobuf field bool enable_image_annotation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableImageAnnotation() + { + return $this->enable_image_annotation; + } + + /** + * Optional. Whether to include image annotations in layout parser response. + * + * Generated from protobuf field bool enable_image_annotation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableImageAnnotation($var) + { + GPBUtil::checkBool($var); + $this->enable_image_annotation = $var; + + return $this; + } + + /** + * Optional. Whether to include table annotations in layout parser response. + * + * Generated from protobuf field bool enable_table_annotation = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableTableAnnotation() + { + return $this->enable_table_annotation; + } + + /** + * Optional. Whether to include table annotations in layout parser response. + * + * Generated from protobuf field bool enable_table_annotation = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableTableAnnotation($var) + { + GPBUtil::checkBool($var); + $this->enable_table_annotation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions/LayoutConfig/ChunkingConfig.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions/LayoutConfig/ChunkingConfig.php new file mode 100644 index 000000000000..31aa8c434a1a --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions/LayoutConfig/ChunkingConfig.php @@ -0,0 +1,105 @@ +google.cloud.documentai.v1.ProcessOptions.LayoutConfig.ChunkingConfig + */ +class ChunkingConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The chunk sizes to use when splitting documents, in order of + * level. + * + * Generated from protobuf field int32 chunk_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $chunk_size = 0; + /** + * Optional. Whether or not to include ancestor headings when splitting. + * + * Generated from protobuf field bool include_ancestor_headings = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $include_ancestor_headings = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $chunk_size + * Optional. The chunk sizes to use when splitting documents, in order of + * level. + * @type bool $include_ancestor_headings + * Optional. Whether or not to include ancestor headings when splitting. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The chunk sizes to use when splitting documents, in order of + * level. + * + * Generated from protobuf field int32 chunk_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getChunkSize() + { + return $this->chunk_size; + } + + /** + * Optional. The chunk sizes to use when splitting documents, in order of + * level. + * + * Generated from protobuf field int32 chunk_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setChunkSize($var) + { + GPBUtil::checkInt32($var); + $this->chunk_size = $var; + + return $this; + } + + /** + * Optional. Whether or not to include ancestor headings when splitting. + * + * Generated from protobuf field bool include_ancestor_headings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIncludeAncestorHeadings() + { + return $this->include_ancestor_headings; + } + + /** + * Optional. Whether or not to include ancestor headings when splitting. + * + * Generated from protobuf field bool include_ancestor_headings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIncludeAncestorHeadings($var) + { + GPBUtil::checkBool($var); + $this->include_ancestor_headings = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessRequest.php new file mode 100644 index 000000000000..5a4f0e8ad9d1 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessRequest.php @@ -0,0 +1,457 @@ +google.cloud.documentai.v1.ProcessRequest + */ +class ProcessRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the + * [Processor][google.cloud.documentai.v1.Processor] or + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] + * to use for processing. If a + * [Processor][google.cloud.documentai.v1.Processor] is specified, the server + * will use its [default + * version][google.cloud.documentai.v1.Processor.default_processor_version]. + * Format: `projects/{project}/locations/{location}/processors/{processor}`, + * or + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Whether human review should be skipped for this request. Default to + * `false`. + * + * Generated from protobuf field bool skip_human_review = 3; + */ + protected $skip_human_review = false; + /** + * Specifies which fields to include in the + * [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document] + * output. Only supports top-level document and pages field, so it must be in + * the form of `{document_field_name}` or `pages.{page_field_name}`. + * + * Generated from protobuf field .google.protobuf.FieldMask field_mask = 6; + */ + protected $field_mask = null; + /** + * Inference-time options for the process API + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessOptions process_options = 7; + */ + protected $process_options = null; + /** + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints) and can only contain lowercase letters, numeric + * characters, underscores, and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Option to remove images from the document. + * + * Generated from protobuf field bool imageless_mode = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $imageless_mode = false; + protected $source; + + /** + * @param string $name Required. The resource name of the + * [Processor][google.cloud.documentai.v1.Processor] or + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] + * to use for processing. If a + * [Processor][google.cloud.documentai.v1.Processor] is specified, the server + * will use its [default + * version][google.cloud.documentai.v1.Processor.default_processor_version]. + * Format: `projects/{project}/locations/{location}/processors/{processor}`, + * or + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + * + * @return \Google\Cloud\DocumentAI\V1\ProcessRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document $inline_document + * An inline document proto. + * @type \Google\Cloud\DocumentAI\V1\RawDocument $raw_document + * A raw document content (bytes). + * @type \Google\Cloud\DocumentAI\V1\GcsDocument $gcs_document + * A raw document on Google Cloud Storage. + * @type string $name + * Required. The resource name of the + * [Processor][google.cloud.documentai.v1.Processor] or + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] + * to use for processing. If a + * [Processor][google.cloud.documentai.v1.Processor] is specified, the server + * will use its [default + * version][google.cloud.documentai.v1.Processor.default_processor_version]. + * Format: `projects/{project}/locations/{location}/processors/{processor}`, + * or + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + * @type bool $skip_human_review + * Whether human review should be skipped for this request. Default to + * `false`. + * @type \Google\Protobuf\FieldMask $field_mask + * Specifies which fields to include in the + * [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document] + * output. Only supports top-level document and pages field, so it must be in + * the form of `{document_field_name}` or `pages.{page_field_name}`. + * @type \Google\Cloud\DocumentAI\V1\ProcessOptions $process_options + * Inference-time options for the process API + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints) and can only contain lowercase letters, numeric + * characters, underscores, and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * @type bool $imageless_mode + * Optional. Option to remove images from the document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * An inline document proto. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document inline_document = 4; + * @return \Google\Cloud\DocumentAI\V1\Document|null + */ + public function getInlineDocument() + { + return $this->readOneof(4); + } + + public function hasInlineDocument() + { + return $this->hasOneof(4); + } + + /** + * An inline document proto. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document inline_document = 4; + * @param \Google\Cloud\DocumentAI\V1\Document $var + * @return $this + */ + public function setInlineDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * A raw document content (bytes). + * + * Generated from protobuf field .google.cloud.documentai.v1.RawDocument raw_document = 5; + * @return \Google\Cloud\DocumentAI\V1\RawDocument|null + */ + public function getRawDocument() + { + return $this->readOneof(5); + } + + public function hasRawDocument() + { + return $this->hasOneof(5); + } + + /** + * A raw document content (bytes). + * + * Generated from protobuf field .google.cloud.documentai.v1.RawDocument raw_document = 5; + * @param \Google\Cloud\DocumentAI\V1\RawDocument $var + * @return $this + */ + public function setRawDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\RawDocument::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * A raw document on Google Cloud Storage. + * + * Generated from protobuf field .google.cloud.documentai.v1.GcsDocument gcs_document = 8; + * @return \Google\Cloud\DocumentAI\V1\GcsDocument|null + */ + public function getGcsDocument() + { + return $this->readOneof(8); + } + + public function hasGcsDocument() + { + return $this->hasOneof(8); + } + + /** + * A raw document on Google Cloud Storage. + * + * Generated from protobuf field .google.cloud.documentai.v1.GcsDocument gcs_document = 8; + * @param \Google\Cloud\DocumentAI\V1\GcsDocument $var + * @return $this + */ + public function setGcsDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\GcsDocument::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Required. The resource name of the + * [Processor][google.cloud.documentai.v1.Processor] or + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] + * to use for processing. If a + * [Processor][google.cloud.documentai.v1.Processor] is specified, the server + * will use its [default + * version][google.cloud.documentai.v1.Processor.default_processor_version]. + * Format: `projects/{project}/locations/{location}/processors/{processor}`, + * or + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the + * [Processor][google.cloud.documentai.v1.Processor] or + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] + * to use for processing. If a + * [Processor][google.cloud.documentai.v1.Processor] is specified, the server + * will use its [default + * version][google.cloud.documentai.v1.Processor.default_processor_version]. + * Format: `projects/{project}/locations/{location}/processors/{processor}`, + * or + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Whether human review should be skipped for this request. Default to + * `false`. + * + * Generated from protobuf field bool skip_human_review = 3; + * @return bool + */ + public function getSkipHumanReview() + { + return $this->skip_human_review; + } + + /** + * Whether human review should be skipped for this request. Default to + * `false`. + * + * Generated from protobuf field bool skip_human_review = 3; + * @param bool $var + * @return $this + */ + public function setSkipHumanReview($var) + { + GPBUtil::checkBool($var); + $this->skip_human_review = $var; + + return $this; + } + + /** + * Specifies which fields to include in the + * [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document] + * output. Only supports top-level document and pages field, so it must be in + * the form of `{document_field_name}` or `pages.{page_field_name}`. + * + * Generated from protobuf field .google.protobuf.FieldMask field_mask = 6; + * @return \Google\Protobuf\FieldMask|null + */ + public function getFieldMask() + { + return $this->field_mask; + } + + public function hasFieldMask() + { + return isset($this->field_mask); + } + + public function clearFieldMask() + { + unset($this->field_mask); + } + + /** + * Specifies which fields to include in the + * [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document] + * output. Only supports top-level document and pages field, so it must be in + * the form of `{document_field_name}` or `pages.{page_field_name}`. + * + * Generated from protobuf field .google.protobuf.FieldMask field_mask = 6; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setFieldMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->field_mask = $var; + + return $this; + } + + /** + * Inference-time options for the process API + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessOptions process_options = 7; + * @return \Google\Cloud\DocumentAI\V1\ProcessOptions|null + */ + public function getProcessOptions() + { + return $this->process_options; + } + + public function hasProcessOptions() + { + return isset($this->process_options); + } + + public function clearProcessOptions() + { + unset($this->process_options); + } + + /** + * Inference-time options for the process API + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessOptions process_options = 7; + * @param \Google\Cloud\DocumentAI\V1\ProcessOptions $var + * @return $this + */ + public function setProcessOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\ProcessOptions::class); + $this->process_options = $var; + + return $this; + } + + /** + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints) and can only contain lowercase letters, numeric + * characters, underscores, and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints) and can only contain lowercase letters, numeric + * characters, underscores, and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. Option to remove images from the document. + * + * Generated from protobuf field bool imageless_mode = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getImagelessMode() + { + return $this->imageless_mode; + } + + /** + * Optional. Option to remove images from the document. + * + * Generated from protobuf field bool imageless_mode = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setImagelessMode($var) + { + GPBUtil::checkBool($var); + $this->imageless_mode = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessResponse.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessResponse.php new file mode 100644 index 000000000000..db0f5d1110bc --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessResponse.php @@ -0,0 +1,127 @@ +google.cloud.documentai.v1.ProcessResponse + */ +class ProcessResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The document payload, will populate fields based on the processor's + * behavior. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document document = 1; + */ + protected $document = null; + /** + * The status of human review on the processed document. + * + * Generated from protobuf field .google.cloud.documentai.v1.HumanReviewStatus human_review_status = 3; + */ + protected $human_review_status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document $document + * The document payload, will populate fields based on the processor's + * behavior. + * @type \Google\Cloud\DocumentAI\V1\HumanReviewStatus $human_review_status + * The status of human review on the processed document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * The document payload, will populate fields based on the processor's + * behavior. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document document = 1; + * @return \Google\Cloud\DocumentAI\V1\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * The document payload, will populate fields based on the processor's + * behavior. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document document = 1; + * @param \Google\Cloud\DocumentAI\V1\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document::class); + $this->document = $var; + + return $this; + } + + /** + * The status of human review on the processed document. + * + * Generated from protobuf field .google.cloud.documentai.v1.HumanReviewStatus human_review_status = 3; + * @return \Google\Cloud\DocumentAI\V1\HumanReviewStatus|null + */ + public function getHumanReviewStatus() + { + return $this->human_review_status; + } + + public function hasHumanReviewStatus() + { + return isset($this->human_review_status); + } + + public function clearHumanReviewStatus() + { + unset($this->human_review_status); + } + + /** + * The status of human review on the processed document. + * + * Generated from protobuf field .google.cloud.documentai.v1.HumanReviewStatus human_review_status = 3; + * @param \Google\Cloud\DocumentAI\V1\HumanReviewStatus $var + * @return $this + */ + public function setHumanReviewStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\HumanReviewStatus::class); + $this->human_review_status = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Processor.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Processor.php new file mode 100644 index 000000000000..8977e45fd4dd --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Processor.php @@ -0,0 +1,438 @@ +google.cloud.documentai.v1.Processor + */ +class Processor extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Immutable. The resource name of the processor. + * Format: `projects/{project}/locations/{location}/processors/{processor}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * The processor type, such as: `OCR_PROCESSOR`, `INVOICE_PROCESSOR`. + * To get a list of processor types, see + * [FetchProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.FetchProcessorTypes]. + * + * Generated from protobuf field string type = 2; + */ + protected $type = ''; + /** + * The display name of the processor. + * + * Generated from protobuf field string display_name = 3; + */ + protected $display_name = ''; + /** + * Output only. The state of the processor. + * + * Generated from protobuf field .google.cloud.documentai.v1.Processor.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * The default processor version. + * + * Generated from protobuf field string default_processor_version = 9 [(.google.api.resource_reference) = { + */ + protected $default_processor_version = ''; + /** + * Output only. The processor version aliases. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.ProcessorVersionAlias processor_version_aliases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $processor_version_aliases; + /** + * Output only. Immutable. The http endpoint that can be called to invoke + * processing. + * + * Generated from protobuf field string process_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $process_endpoint = ''; + /** + * Output only. The time the processor was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * The [KMS key](https://cloud.google.com/security-key-management) used for + * encryption and decryption in CMEK scenarios. + * + * Generated from protobuf field string kms_key_name = 8; + */ + protected $kms_key_name = ''; + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzs = false; + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzi = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzi = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Immutable. The resource name of the processor. + * Format: `projects/{project}/locations/{location}/processors/{processor}` + * @type string $type + * The processor type, such as: `OCR_PROCESSOR`, `INVOICE_PROCESSOR`. + * To get a list of processor types, see + * [FetchProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.FetchProcessorTypes]. + * @type string $display_name + * The display name of the processor. + * @type int $state + * Output only. The state of the processor. + * @type string $default_processor_version + * The default processor version. + * @type \Google\Cloud\DocumentAI\V1\ProcessorVersionAlias[] $processor_version_aliases + * Output only. The processor version aliases. + * @type string $process_endpoint + * Output only. Immutable. The http endpoint that can be called to invoke + * processing. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the processor was created. + * @type string $kms_key_name + * The [KMS key](https://cloud.google.com/security-key-management) used for + * encryption and decryption in CMEK scenarios. + * @type bool $satisfies_pzs + * Output only. Reserved for future use. + * @type bool $satisfies_pzi + * Output only. Reserved for future use. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Processor::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Immutable. The resource name of the processor. + * Format: `projects/{project}/locations/{location}/processors/{processor}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Immutable. The resource name of the processor. + * Format: `projects/{project}/locations/{location}/processors/{processor}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The processor type, such as: `OCR_PROCESSOR`, `INVOICE_PROCESSOR`. + * To get a list of processor types, see + * [FetchProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.FetchProcessorTypes]. + * + * Generated from protobuf field string type = 2; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * The processor type, such as: `OCR_PROCESSOR`, `INVOICE_PROCESSOR`. + * To get a list of processor types, see + * [FetchProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.FetchProcessorTypes]. + * + * Generated from protobuf field string type = 2; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * The display name of the processor. + * + * Generated from protobuf field string display_name = 3; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The display name of the processor. + * + * Generated from protobuf field string display_name = 3; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. The state of the processor. + * + * Generated from protobuf field .google.cloud.documentai.v1.Processor.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the processor. + * + * Generated from protobuf field .google.cloud.documentai.v1.Processor.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\Processor\State::class); + $this->state = $var; + + return $this; + } + + /** + * The default processor version. + * + * Generated from protobuf field string default_processor_version = 9 [(.google.api.resource_reference) = { + * @return string + */ + public function getDefaultProcessorVersion() + { + return $this->default_processor_version; + } + + /** + * The default processor version. + * + * Generated from protobuf field string default_processor_version = 9 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDefaultProcessorVersion($var) + { + GPBUtil::checkString($var, True); + $this->default_processor_version = $var; + + return $this; + } + + /** + * Output only. The processor version aliases. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.ProcessorVersionAlias processor_version_aliases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\ProcessorVersionAlias> + */ + public function getProcessorVersionAliases() + { + return $this->processor_version_aliases; + } + + /** + * Output only. The processor version aliases. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.ProcessorVersionAlias processor_version_aliases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\DocumentAI\V1\ProcessorVersionAlias[] $var + * @return $this + */ + public function setProcessorVersionAliases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\ProcessorVersionAlias::class); + $this->processor_version_aliases = $arr; + + return $this; + } + + /** + * Output only. Immutable. The http endpoint that can be called to invoke + * processing. + * + * Generated from protobuf field string process_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getProcessEndpoint() + { + return $this->process_endpoint; + } + + /** + * Output only. Immutable. The http endpoint that can be called to invoke + * processing. + * + * Generated from protobuf field string process_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setProcessEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->process_endpoint = $var; + + return $this; + } + + /** + * Output only. The time the processor was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the processor was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * The [KMS key](https://cloud.google.com/security-key-management) used for + * encryption and decryption in CMEK scenarios. + * + * Generated from protobuf field string kms_key_name = 8; + * @return string + */ + public function getKmsKeyName() + { + return $this->kms_key_name; + } + + /** + * The [KMS key](https://cloud.google.com/security-key-management) used for + * encryption and decryption in CMEK scenarios. + * + * Generated from protobuf field string kms_key_name = 8; + * @param string $var + * @return $this + */ + public function setKmsKeyName($var) + { + GPBUtil::checkString($var, True); + $this->kms_key_name = $var; + + return $this; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getSatisfiesPzs() + { + return $this->satisfies_pzs; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzs($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzs = $var; + + return $this; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzi = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getSatisfiesPzi() + { + return $this->satisfies_pzi; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzi = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzi($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzi = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Processor/State.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Processor/State.php new file mode 100644 index 000000000000..35136b77d52e --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Processor/State.php @@ -0,0 +1,104 @@ +google.cloud.documentai.v1.Processor.State + */ +class State +{ + /** + * The processor is in an unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The processor is enabled, i.e., has an enabled version which can + * currently serve processing requests and all the feature dependencies have + * been successfully initialized. + * + * Generated from protobuf enum ENABLED = 1; + */ + const ENABLED = 1; + /** + * The processor is disabled. + * + * Generated from protobuf enum DISABLED = 2; + */ + const DISABLED = 2; + /** + * The processor is being enabled, will become `ENABLED` if successful. + * + * Generated from protobuf enum ENABLING = 3; + */ + const ENABLING = 3; + /** + * The processor is being disabled, will become `DISABLED` if successful. + * + * Generated from protobuf enum DISABLING = 4; + */ + const DISABLING = 4; + /** + * The processor is being created, will become either `ENABLED` (for + * successful creation) or `FAILED` (for failed ones). + * Once a processor is in this state, it can then be used for document + * processing, but the feature dependencies of the processor might not be + * fully created yet. + * + * Generated from protobuf enum CREATING = 5; + */ + const CREATING = 5; + /** + * The processor failed during creation or initialization of feature + * dependencies. The user should delete the processor and recreate one as + * all the functionalities of the processor are disabled. + * + * Generated from protobuf enum FAILED = 6; + */ + const FAILED = 6; + /** + * The processor is being deleted, will be removed if successful. + * + * Generated from protobuf enum DELETING = 7; + */ + const DELETING = 7; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ENABLED => 'ENABLED', + self::DISABLED => 'DISABLED', + self::ENABLING => 'ENABLING', + self::DISABLING => 'DISABLING', + self::CREATING => 'CREATING', + self::FAILED => 'FAILED', + self::DELETING => 'DELETING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorType.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorType.php new file mode 100644 index 000000000000..f368f59971c8 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorType.php @@ -0,0 +1,280 @@ +google.cloud.documentai.v1.ProcessorType + */ +class ProcessorType extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the processor type. + * Format: `projects/{project}/processorTypes/{processor_type}` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The processor type, such as: `OCR_PROCESSOR`, `INVOICE_PROCESSOR`. + * + * Generated from protobuf field string type = 2; + */ + protected $type = ''; + /** + * The processor category, used by UI to group processor types. + * + * Generated from protobuf field string category = 3; + */ + protected $category = ''; + /** + * The locations in which this processor is available. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.ProcessorType.LocationInfo available_locations = 4; + */ + private $available_locations; + /** + * Whether the processor type allows creation. If true, users can create a + * processor of this processor type. Otherwise, users need to request access. + * + * Generated from protobuf field bool allow_creation = 6; + */ + protected $allow_creation = false; + /** + * Launch stage of the processor type + * + * Generated from protobuf field .google.api.LaunchStage launch_stage = 8; + */ + protected $launch_stage = 0; + /** + * A set of Cloud Storage URIs of sample documents for this processor. + * + * Generated from protobuf field repeated string sample_document_uris = 9; + */ + private $sample_document_uris; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the processor type. + * Format: `projects/{project}/processorTypes/{processor_type}` + * @type string $type + * The processor type, such as: `OCR_PROCESSOR`, `INVOICE_PROCESSOR`. + * @type string $category + * The processor category, used by UI to group processor types. + * @type \Google\Cloud\DocumentAI\V1\ProcessorType\LocationInfo[] $available_locations + * The locations in which this processor is available. + * @type bool $allow_creation + * Whether the processor type allows creation. If true, users can create a + * processor of this processor type. Otherwise, users need to request access. + * @type int $launch_stage + * Launch stage of the processor type + * @type string[] $sample_document_uris + * A set of Cloud Storage URIs of sample documents for this processor. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\ProcessorType::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the processor type. + * Format: `projects/{project}/processorTypes/{processor_type}` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the processor type. + * Format: `projects/{project}/processorTypes/{processor_type}` + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The processor type, such as: `OCR_PROCESSOR`, `INVOICE_PROCESSOR`. + * + * Generated from protobuf field string type = 2; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * The processor type, such as: `OCR_PROCESSOR`, `INVOICE_PROCESSOR`. + * + * Generated from protobuf field string type = 2; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * The processor category, used by UI to group processor types. + * + * Generated from protobuf field string category = 3; + * @return string + */ + public function getCategory() + { + return $this->category; + } + + /** + * The processor category, used by UI to group processor types. + * + * Generated from protobuf field string category = 3; + * @param string $var + * @return $this + */ + public function setCategory($var) + { + GPBUtil::checkString($var, True); + $this->category = $var; + + return $this; + } + + /** + * The locations in which this processor is available. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.ProcessorType.LocationInfo available_locations = 4; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\ProcessorType\LocationInfo> + */ + public function getAvailableLocations() + { + return $this->available_locations; + } + + /** + * The locations in which this processor is available. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.ProcessorType.LocationInfo available_locations = 4; + * @param \Google\Cloud\DocumentAI\V1\ProcessorType\LocationInfo[] $var + * @return $this + */ + public function setAvailableLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\ProcessorType\LocationInfo::class); + $this->available_locations = $arr; + + return $this; + } + + /** + * Whether the processor type allows creation. If true, users can create a + * processor of this processor type. Otherwise, users need to request access. + * + * Generated from protobuf field bool allow_creation = 6; + * @return bool + */ + public function getAllowCreation() + { + return $this->allow_creation; + } + + /** + * Whether the processor type allows creation. If true, users can create a + * processor of this processor type. Otherwise, users need to request access. + * + * Generated from protobuf field bool allow_creation = 6; + * @param bool $var + * @return $this + */ + public function setAllowCreation($var) + { + GPBUtil::checkBool($var); + $this->allow_creation = $var; + + return $this; + } + + /** + * Launch stage of the processor type + * + * Generated from protobuf field .google.api.LaunchStage launch_stage = 8; + * @return int + */ + public function getLaunchStage() + { + return $this->launch_stage; + } + + /** + * Launch stage of the processor type + * + * Generated from protobuf field .google.api.LaunchStage launch_stage = 8; + * @param int $var + * @return $this + */ + public function setLaunchStage($var) + { + GPBUtil::checkEnum($var, \Google\Api\LaunchStage::class); + $this->launch_stage = $var; + + return $this; + } + + /** + * A set of Cloud Storage URIs of sample documents for this processor. + * + * Generated from protobuf field repeated string sample_document_uris = 9; + * @return RepeatedField + */ + public function getSampleDocumentUris() + { + return $this->sample_document_uris; + } + + /** + * A set of Cloud Storage URIs of sample documents for this processor. + * + * Generated from protobuf field repeated string sample_document_uris = 9; + * @param string[] $var + * @return $this + */ + public function setSampleDocumentUris($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->sample_document_uris = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorType/LocationInfo.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorType/LocationInfo.php new file mode 100644 index 000000000000..e4121d9355f7 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorType/LocationInfo.php @@ -0,0 +1,71 @@ +google.cloud.documentai.v1.ProcessorType.LocationInfo + */ +class LocationInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The location ID. For supported locations, refer to [regional and + * multi-regional support](/document-ai/docs/regions). + * + * Generated from protobuf field string location_id = 1; + */ + protected $location_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $location_id + * The location ID. For supported locations, refer to [regional and + * multi-regional support](/document-ai/docs/regions). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\ProcessorType::initOnce(); + parent::__construct($data); + } + + /** + * The location ID. For supported locations, refer to [regional and + * multi-regional support](/document-ai/docs/regions). + * + * Generated from protobuf field string location_id = 1; + * @return string + */ + public function getLocationId() + { + return $this->location_id; + } + + /** + * The location ID. For supported locations, refer to [regional and + * multi-regional support](/document-ai/docs/regions). + * + * Generated from protobuf field string location_id = 1; + * @param string $var + * @return $this + */ + public function setLocationId($var) + { + GPBUtil::checkString($var, True); + $this->location_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion.php new file mode 100644 index 000000000000..7e80962ea6ae --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion.php @@ -0,0 +1,582 @@ +google.cloud.documentai.v1.ProcessorVersion + */ +class ProcessorVersion extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the processor version. + * Format: + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * The display name of the processor version. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * Output only. The schema of the processor version. Describes the output. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema document_schema = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $document_schema = null; + /** + * Output only. The state of the processor version. + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The time the processor version was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The most recently invoked evaluation for the processor + * version. + * + * Generated from protobuf field .google.cloud.documentai.v1.EvaluationReference latest_evaluation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $latest_evaluation = null; + /** + * Output only. The KMS key name used for encryption. + * + * Generated from protobuf field string kms_key_name = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $kms_key_name = ''; + /** + * Output only. The KMS key version with which data is encrypted. + * + * Generated from protobuf field string kms_key_version_name = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $kms_key_version_name = ''; + /** + * Output only. Denotes that this `ProcessorVersion` is managed by Google. + * + * Generated from protobuf field bool google_managed = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $google_managed = false; + /** + * Output only. If set, information about the eventual deprecation of this + * version. + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.DeprecationInfo deprecation_info = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $deprecation_info = null; + /** + * Output only. The model type of this processor version. + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.ModelType model_type = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $model_type = 0; + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzs = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzs = false; + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzi = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzi = false; + /** + * Output only. Information about Generative AI model-based processor + * versions. + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo gen_ai_model_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $gen_ai_model_info = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the processor version. + * Format: + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}` + * @type string $display_name + * The display name of the processor version. + * @type \Google\Cloud\DocumentAI\V1\DocumentSchema $document_schema + * Output only. The schema of the processor version. Describes the output. + * @type int $state + * Output only. The state of the processor version. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the processor version was created. + * @type \Google\Cloud\DocumentAI\V1\EvaluationReference $latest_evaluation + * Output only. The most recently invoked evaluation for the processor + * version. + * @type string $kms_key_name + * Output only. The KMS key name used for encryption. + * @type string $kms_key_version_name + * Output only. The KMS key version with which data is encrypted. + * @type bool $google_managed + * Output only. Denotes that this `ProcessorVersion` is managed by Google. + * @type \Google\Cloud\DocumentAI\V1\ProcessorVersion\DeprecationInfo $deprecation_info + * Output only. If set, information about the eventual deprecation of this + * version. + * @type int $model_type + * Output only. The model type of this processor version. + * @type bool $satisfies_pzs + * Output only. Reserved for future use. + * @type bool $satisfies_pzi + * Output only. Reserved for future use. + * @type \Google\Cloud\DocumentAI\V1\ProcessorVersion\GenAiModelInfo $gen_ai_model_info + * Output only. Information about Generative AI model-based processor + * versions. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Processor::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the processor version. + * Format: + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the processor version. + * Format: + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The display name of the processor version. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The display name of the processor version. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. The schema of the processor version. Describes the output. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema document_schema = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\DocumentAI\V1\DocumentSchema|null + */ + public function getDocumentSchema() + { + return $this->document_schema; + } + + public function hasDocumentSchema() + { + return isset($this->document_schema); + } + + public function clearDocumentSchema() + { + unset($this->document_schema); + } + + /** + * Output only. The schema of the processor version. Describes the output. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema document_schema = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\DocumentAI\V1\DocumentSchema $var + * @return $this + */ + public function setDocumentSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\DocumentSchema::class); + $this->document_schema = $var; + + return $this; + } + + /** + * Output only. The state of the processor version. + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the processor version. + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\ProcessorVersion\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The time the processor version was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the processor version was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The most recently invoked evaluation for the processor + * version. + * + * Generated from protobuf field .google.cloud.documentai.v1.EvaluationReference latest_evaluation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\DocumentAI\V1\EvaluationReference|null + */ + public function getLatestEvaluation() + { + return $this->latest_evaluation; + } + + public function hasLatestEvaluation() + { + return isset($this->latest_evaluation); + } + + public function clearLatestEvaluation() + { + unset($this->latest_evaluation); + } + + /** + * Output only. The most recently invoked evaluation for the processor + * version. + * + * Generated from protobuf field .google.cloud.documentai.v1.EvaluationReference latest_evaluation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\DocumentAI\V1\EvaluationReference $var + * @return $this + */ + public function setLatestEvaluation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\EvaluationReference::class); + $this->latest_evaluation = $var; + + return $this; + } + + /** + * Output only. The KMS key name used for encryption. + * + * Generated from protobuf field string kms_key_name = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getKmsKeyName() + { + return $this->kms_key_name; + } + + /** + * Output only. The KMS key name used for encryption. + * + * Generated from protobuf field string kms_key_name = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setKmsKeyName($var) + { + GPBUtil::checkString($var, True); + $this->kms_key_name = $var; + + return $this; + } + + /** + * Output only. The KMS key version with which data is encrypted. + * + * Generated from protobuf field string kms_key_version_name = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getKmsKeyVersionName() + { + return $this->kms_key_version_name; + } + + /** + * Output only. The KMS key version with which data is encrypted. + * + * Generated from protobuf field string kms_key_version_name = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setKmsKeyVersionName($var) + { + GPBUtil::checkString($var, True); + $this->kms_key_version_name = $var; + + return $this; + } + + /** + * Output only. Denotes that this `ProcessorVersion` is managed by Google. + * + * Generated from protobuf field bool google_managed = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getGoogleManaged() + { + return $this->google_managed; + } + + /** + * Output only. Denotes that this `ProcessorVersion` is managed by Google. + * + * Generated from protobuf field bool google_managed = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setGoogleManaged($var) + { + GPBUtil::checkBool($var); + $this->google_managed = $var; + + return $this; + } + + /** + * Output only. If set, information about the eventual deprecation of this + * version. + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.DeprecationInfo deprecation_info = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\DocumentAI\V1\ProcessorVersion\DeprecationInfo|null + */ + public function getDeprecationInfo() + { + return $this->deprecation_info; + } + + public function hasDeprecationInfo() + { + return isset($this->deprecation_info); + } + + public function clearDeprecationInfo() + { + unset($this->deprecation_info); + } + + /** + * Output only. If set, information about the eventual deprecation of this + * version. + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.DeprecationInfo deprecation_info = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\DocumentAI\V1\ProcessorVersion\DeprecationInfo $var + * @return $this + */ + public function setDeprecationInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\ProcessorVersion\DeprecationInfo::class); + $this->deprecation_info = $var; + + return $this; + } + + /** + * Output only. The model type of this processor version. + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.ModelType model_type = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getModelType() + { + return $this->model_type; + } + + /** + * Output only. The model type of this processor version. + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.ModelType model_type = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setModelType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\ProcessorVersion\ModelType::class); + $this->model_type = $var; + + return $this; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzs = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getSatisfiesPzs() + { + return $this->satisfies_pzs; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzs = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzs($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzs = $var; + + return $this; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzi = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getSatisfiesPzi() + { + return $this->satisfies_pzi; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzi = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzi($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzi = $var; + + return $this; + } + + /** + * Output only. Information about Generative AI model-based processor + * versions. + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo gen_ai_model_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\DocumentAI\V1\ProcessorVersion\GenAiModelInfo|null + */ + public function getGenAiModelInfo() + { + return $this->gen_ai_model_info; + } + + public function hasGenAiModelInfo() + { + return isset($this->gen_ai_model_info); + } + + public function clearGenAiModelInfo() + { + unset($this->gen_ai_model_info); + } + + /** + * Output only. Information about Generative AI model-based processor + * versions. + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo gen_ai_model_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\DocumentAI\V1\ProcessorVersion\GenAiModelInfo $var + * @return $this + */ + public function setGenAiModelInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\ProcessorVersion\GenAiModelInfo::class); + $this->gen_ai_model_info = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/DeprecationInfo.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/DeprecationInfo.php new file mode 100644 index 000000000000..9d8c25b77f55 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/DeprecationInfo.php @@ -0,0 +1,111 @@ +google.cloud.documentai.v1.ProcessorVersion.DeprecationInfo + */ +class DeprecationInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The time at which this processor version will be deprecated. + * + * Generated from protobuf field .google.protobuf.Timestamp deprecation_time = 1; + */ + protected $deprecation_time = null; + /** + * If set, the processor version that will be used as a replacement. + * + * Generated from protobuf field string replacement_processor_version = 2 [(.google.api.resource_reference) = { + */ + protected $replacement_processor_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $deprecation_time + * The time at which this processor version will be deprecated. + * @type string $replacement_processor_version + * If set, the processor version that will be used as a replacement. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Processor::initOnce(); + parent::__construct($data); + } + + /** + * The time at which this processor version will be deprecated. + * + * Generated from protobuf field .google.protobuf.Timestamp deprecation_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeprecationTime() + { + return $this->deprecation_time; + } + + public function hasDeprecationTime() + { + return isset($this->deprecation_time); + } + + public function clearDeprecationTime() + { + unset($this->deprecation_time); + } + + /** + * The time at which this processor version will be deprecated. + * + * Generated from protobuf field .google.protobuf.Timestamp deprecation_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeprecationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->deprecation_time = $var; + + return $this; + } + + /** + * If set, the processor version that will be used as a replacement. + * + * Generated from protobuf field string replacement_processor_version = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getReplacementProcessorVersion() + { + return $this->replacement_processor_version; + } + + /** + * If set, the processor version that will be used as a replacement. + * + * Generated from protobuf field string replacement_processor_version = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setReplacementProcessorVersion($var) + { + GPBUtil::checkString($var, True); + $this->replacement_processor_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo.php new file mode 100644 index 000000000000..966905e2b44e --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo.php @@ -0,0 +1,108 @@ +google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo + */ +class GenAiModelInfo extends \Google\Protobuf\Internal\Message +{ + protected $model_info; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\ProcessorVersion\GenAiModelInfo\FoundationGenAiModelInfo $foundation_gen_ai_model_info + * Information for a pretrained Google-managed foundation model. + * @type \Google\Cloud\DocumentAI\V1\ProcessorVersion\GenAiModelInfo\CustomGenAiModelInfo $custom_gen_ai_model_info + * Information for a custom Generative AI model created by the user. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Processor::initOnce(); + parent::__construct($data); + } + + /** + * Information for a pretrained Google-managed foundation model. + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.FoundationGenAiModelInfo foundation_gen_ai_model_info = 1; + * @return \Google\Cloud\DocumentAI\V1\ProcessorVersion\GenAiModelInfo\FoundationGenAiModelInfo|null + */ + public function getFoundationGenAiModelInfo() + { + return $this->readOneof(1); + } + + public function hasFoundationGenAiModelInfo() + { + return $this->hasOneof(1); + } + + /** + * Information for a pretrained Google-managed foundation model. + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.FoundationGenAiModelInfo foundation_gen_ai_model_info = 1; + * @param \Google\Cloud\DocumentAI\V1\ProcessorVersion\GenAiModelInfo\FoundationGenAiModelInfo $var + * @return $this + */ + public function setFoundationGenAiModelInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\ProcessorVersion\GenAiModelInfo\FoundationGenAiModelInfo::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Information for a custom Generative AI model created by the user. + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.CustomGenAiModelInfo custom_gen_ai_model_info = 2; + * @return \Google\Cloud\DocumentAI\V1\ProcessorVersion\GenAiModelInfo\CustomGenAiModelInfo|null + */ + public function getCustomGenAiModelInfo() + { + return $this->readOneof(2); + } + + public function hasCustomGenAiModelInfo() + { + return $this->hasOneof(2); + } + + /** + * Information for a custom Generative AI model created by the user. + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.CustomGenAiModelInfo custom_gen_ai_model_info = 2; + * @param \Google\Cloud\DocumentAI\V1\ProcessorVersion\GenAiModelInfo\CustomGenAiModelInfo $var + * @return $this + */ + public function setCustomGenAiModelInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\ProcessorVersion\GenAiModelInfo\CustomGenAiModelInfo::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getModelInfo() + { + return $this->whichOneof("model_info"); + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo/CustomGenAiModelInfo.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo/CustomGenAiModelInfo.php new file mode 100644 index 000000000000..687c118fa648 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo/CustomGenAiModelInfo.php @@ -0,0 +1,103 @@ +google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.CustomGenAiModelInfo + */ +class CustomGenAiModelInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The type of custom model created by the user. + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.CustomGenAiModelInfo.CustomModelType custom_model_type = 1; + */ + protected $custom_model_type = 0; + /** + * The base processor version ID for the custom model. + * + * Generated from protobuf field string base_processor_version_id = 2; + */ + protected $base_processor_version_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $custom_model_type + * The type of custom model created by the user. + * @type string $base_processor_version_id + * The base processor version ID for the custom model. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Processor::initOnce(); + parent::__construct($data); + } + + /** + * The type of custom model created by the user. + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.CustomGenAiModelInfo.CustomModelType custom_model_type = 1; + * @return int + */ + public function getCustomModelType() + { + return $this->custom_model_type; + } + + /** + * The type of custom model created by the user. + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.CustomGenAiModelInfo.CustomModelType custom_model_type = 1; + * @param int $var + * @return $this + */ + public function setCustomModelType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\ProcessorVersion\GenAiModelInfo\CustomGenAiModelInfo\CustomModelType::class); + $this->custom_model_type = $var; + + return $this; + } + + /** + * The base processor version ID for the custom model. + * + * Generated from protobuf field string base_processor_version_id = 2; + * @return string + */ + public function getBaseProcessorVersionId() + { + return $this->base_processor_version_id; + } + + /** + * The base processor version ID for the custom model. + * + * Generated from protobuf field string base_processor_version_id = 2; + * @param string $var + * @return $this + */ + public function setBaseProcessorVersionId($var) + { + GPBUtil::checkString($var, True); + $this->base_processor_version_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo/CustomGenAiModelInfo/CustomModelType.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo/CustomGenAiModelInfo/CustomModelType.php new file mode 100644 index 000000000000..47560b06581b --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo/CustomGenAiModelInfo/CustomModelType.php @@ -0,0 +1,61 @@ +google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.CustomGenAiModelInfo.CustomModelType + */ +class CustomModelType +{ + /** + * The model type is unspecified. + * + * Generated from protobuf enum CUSTOM_MODEL_TYPE_UNSPECIFIED = 0; + */ + const CUSTOM_MODEL_TYPE_UNSPECIFIED = 0; + /** + * The model is a versioned foundation model. + * + * Generated from protobuf enum VERSIONED_FOUNDATION = 1; + */ + const VERSIONED_FOUNDATION = 1; + /** + * The model is a finetuned foundation model. + * + * Generated from protobuf enum FINE_TUNED = 2; + */ + const FINE_TUNED = 2; + + private static $valueToName = [ + self::CUSTOM_MODEL_TYPE_UNSPECIFIED => 'CUSTOM_MODEL_TYPE_UNSPECIFIED', + self::VERSIONED_FOUNDATION => 'VERSIONED_FOUNDATION', + self::FINE_TUNED => 'FINE_TUNED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo/FoundationGenAiModelInfo.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo/FoundationGenAiModelInfo.php new file mode 100644 index 000000000000..812e5a36c072 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo/FoundationGenAiModelInfo.php @@ -0,0 +1,105 @@ +google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.FoundationGenAiModelInfo + */ +class FoundationGenAiModelInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Whether finetuning is allowed for this base processor version. + * + * Generated from protobuf field bool finetuning_allowed = 1; + */ + protected $finetuning_allowed = false; + /** + * The minimum number of labeled documents in the training dataset + * required for finetuning. + * + * Generated from protobuf field int32 min_train_labeled_documents = 2; + */ + protected $min_train_labeled_documents = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $finetuning_allowed + * Whether finetuning is allowed for this base processor version. + * @type int $min_train_labeled_documents + * The minimum number of labeled documents in the training dataset + * required for finetuning. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Processor::initOnce(); + parent::__construct($data); + } + + /** + * Whether finetuning is allowed for this base processor version. + * + * Generated from protobuf field bool finetuning_allowed = 1; + * @return bool + */ + public function getFinetuningAllowed() + { + return $this->finetuning_allowed; + } + + /** + * Whether finetuning is allowed for this base processor version. + * + * Generated from protobuf field bool finetuning_allowed = 1; + * @param bool $var + * @return $this + */ + public function setFinetuningAllowed($var) + { + GPBUtil::checkBool($var); + $this->finetuning_allowed = $var; + + return $this; + } + + /** + * The minimum number of labeled documents in the training dataset + * required for finetuning. + * + * Generated from protobuf field int32 min_train_labeled_documents = 2; + * @return int + */ + public function getMinTrainLabeledDocuments() + { + return $this->min_train_labeled_documents; + } + + /** + * The minimum number of labeled documents in the training dataset + * required for finetuning. + * + * Generated from protobuf field int32 min_train_labeled_documents = 2; + * @param int $var + * @return $this + */ + public function setMinTrainLabeledDocuments($var) + { + GPBUtil::checkInt32($var); + $this->min_train_labeled_documents = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/ModelType.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/ModelType.php new file mode 100644 index 000000000000..d62c7a97b6c6 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/ModelType.php @@ -0,0 +1,61 @@ +google.cloud.documentai.v1.ProcessorVersion.ModelType + */ +class ModelType +{ + /** + * The processor version has unspecified model type. + * + * Generated from protobuf enum MODEL_TYPE_UNSPECIFIED = 0; + */ + const MODEL_TYPE_UNSPECIFIED = 0; + /** + * The processor version has generative model type. + * + * Generated from protobuf enum MODEL_TYPE_GENERATIVE = 1; + */ + const MODEL_TYPE_GENERATIVE = 1; + /** + * The processor version has custom model type. + * + * Generated from protobuf enum MODEL_TYPE_CUSTOM = 2; + */ + const MODEL_TYPE_CUSTOM = 2; + + private static $valueToName = [ + self::MODEL_TYPE_UNSPECIFIED => 'MODEL_TYPE_UNSPECIFIED', + self::MODEL_TYPE_GENERATIVE => 'MODEL_TYPE_GENERATIVE', + self::MODEL_TYPE_CUSTOM => 'MODEL_TYPE_CUSTOM', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/State.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/State.php new file mode 100644 index 000000000000..c6c4ab8afac6 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/State.php @@ -0,0 +1,103 @@ +google.cloud.documentai.v1.ProcessorVersion.State + */ +class State +{ + /** + * The processor version is in an unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The processor version is deployed and can be used for processing. + * + * Generated from protobuf enum DEPLOYED = 1; + */ + const DEPLOYED = 1; + /** + * The processor version is being deployed. + * + * Generated from protobuf enum DEPLOYING = 2; + */ + const DEPLOYING = 2; + /** + * The processor version is not deployed and cannot be used for processing. + * + * Generated from protobuf enum UNDEPLOYED = 3; + */ + const UNDEPLOYED = 3; + /** + * The processor version is being undeployed. + * + * Generated from protobuf enum UNDEPLOYING = 4; + */ + const UNDEPLOYING = 4; + /** + * The processor version is being created. + * + * Generated from protobuf enum CREATING = 5; + */ + const CREATING = 5; + /** + * The processor version is being deleted. + * + * Generated from protobuf enum DELETING = 6; + */ + const DELETING = 6; + /** + * The processor version failed and is in an indeterminate state. + * + * Generated from protobuf enum FAILED = 7; + */ + const FAILED = 7; + /** + * The processor version is being imported. + * + * Generated from protobuf enum IMPORTING = 8; + */ + const IMPORTING = 8; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::DEPLOYED => 'DEPLOYED', + self::DEPLOYING => 'DEPLOYING', + self::UNDEPLOYED => 'UNDEPLOYED', + self::UNDEPLOYING => 'UNDEPLOYING', + self::CREATING => 'CREATING', + self::DELETING => 'DELETING', + self::FAILED => 'FAILED', + self::IMPORTING => 'IMPORTING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersionAlias.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersionAlias.php new file mode 100644 index 000000000000..09174062b494 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersionAlias.php @@ -0,0 +1,101 @@ +google.cloud.documentai.v1.ProcessorVersionAlias + */ +class ProcessorVersionAlias extends \Google\Protobuf\Internal\Message +{ + /** + * The alias in the form of `processor_version` resource name. + * + * Generated from protobuf field string alias = 1; + */ + protected $alias = ''; + /** + * The resource name of aliased processor version. + * + * Generated from protobuf field string processor_version = 2 [(.google.api.resource_reference) = { + */ + protected $processor_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $alias + * The alias in the form of `processor_version` resource name. + * @type string $processor_version + * The resource name of aliased processor version. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Processor::initOnce(); + parent::__construct($data); + } + + /** + * The alias in the form of `processor_version` resource name. + * + * Generated from protobuf field string alias = 1; + * @return string + */ + public function getAlias() + { + return $this->alias; + } + + /** + * The alias in the form of `processor_version` resource name. + * + * Generated from protobuf field string alias = 1; + * @param string $var + * @return $this + */ + public function setAlias($var) + { + GPBUtil::checkString($var, True); + $this->alias = $var; + + return $this; + } + + /** + * The resource name of aliased processor version. + * + * Generated from protobuf field string processor_version = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getProcessorVersion() + { + return $this->processor_version; + } + + /** + * The resource name of aliased processor version. + * + * Generated from protobuf field string processor_version = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setProcessorVersion($var) + { + GPBUtil::checkString($var, True); + $this->processor_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/RawDocument.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/RawDocument.php new file mode 100644 index 000000000000..37a44014ca10 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/RawDocument.php @@ -0,0 +1,155 @@ +google.cloud.documentai.v1.RawDocument + */ +class RawDocument extends \Google\Protobuf\Internal\Message +{ + /** + * Inline document content. + * + * Generated from protobuf field bytes content = 1; + */ + protected $content = ''; + /** + * An IANA MIME type (RFC6838) indicating the nature and format of the + * [content][google.cloud.documentai.v1.RawDocument.content]. + * + * Generated from protobuf field string mime_type = 2; + */ + protected $mime_type = ''; + /** + * The display name of the document, it supports all Unicode characters except + * the following: + * `*`, `?`, `[`, `]`, `%`, `{`, `}`,`'`, `\"`, `,` + * `~`, `=` and `:` are reserved. + * If not specified, a default ID is generated. + * + * Generated from protobuf field string display_name = 3; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $content + * Inline document content. + * @type string $mime_type + * An IANA MIME type (RFC6838) indicating the nature and format of the + * [content][google.cloud.documentai.v1.RawDocument.content]. + * @type string $display_name + * The display name of the document, it supports all Unicode characters except + * the following: + * `*`, `?`, `[`, `]`, `%`, `{`, `}`,`'`, `\"`, `,` + * `~`, `=` and `:` are reserved. + * If not specified, a default ID is generated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentIo::initOnce(); + parent::__construct($data); + } + + /** + * Inline document content. + * + * Generated from protobuf field bytes content = 1; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Inline document content. + * + * Generated from protobuf field bytes content = 1; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, False); + $this->content = $var; + + return $this; + } + + /** + * An IANA MIME type (RFC6838) indicating the nature and format of the + * [content][google.cloud.documentai.v1.RawDocument.content]. + * + * Generated from protobuf field string mime_type = 2; + * @return string + */ + public function getMimeType() + { + return $this->mime_type; + } + + /** + * An IANA MIME type (RFC6838) indicating the nature and format of the + * [content][google.cloud.documentai.v1.RawDocument.content]. + * + * Generated from protobuf field string mime_type = 2; + * @param string $var + * @return $this + */ + public function setMimeType($var) + { + GPBUtil::checkString($var, True); + $this->mime_type = $var; + + return $this; + } + + /** + * The display name of the document, it supports all Unicode characters except + * the following: + * `*`, `?`, `[`, `]`, `%`, `{`, `}`,`'`, `\"`, `,` + * `~`, `=` and `:` are reserved. + * If not specified, a default ID is generated. + * + * Generated from protobuf field string display_name = 3; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The display name of the document, it supports all Unicode characters except + * the following: + * `*`, `?`, `[`, `]`, `%`, `{`, `}`,`'`, `\"`, `,` + * `~`, `=` and `:` are reserved. + * If not specified, a default ID is generated. + * + * Generated from protobuf field string display_name = 3; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentOperationMetadata.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentOperationMetadata.php new file mode 100644 index 000000000000..d695546d88f1 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentOperationMetadata.php @@ -0,0 +1,113 @@ +google.cloud.documentai.v1.ReviewDocumentOperationMetadata + */ +class ReviewDocumentOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The basic metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 5; + */ + protected $common_metadata = null; + /** + * The Crowd Compute question ID. + * + * Generated from protobuf field string question_id = 6; + */ + protected $question_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $common_metadata + * The basic metadata of the long-running operation. + * @type string $question_id + * The Crowd Compute question ID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * The basic metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 5; + * @return \Google\Cloud\DocumentAI\V1\CommonOperationMetadata|null + */ + public function getCommonMetadata() + { + return $this->common_metadata; + } + + public function hasCommonMetadata() + { + return isset($this->common_metadata); + } + + public function clearCommonMetadata() + { + unset($this->common_metadata); + } + + /** + * The basic metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 5; + * @param \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $var + * @return $this + */ + public function setCommonMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\CommonOperationMetadata::class); + $this->common_metadata = $var; + + return $this; + } + + /** + * The Crowd Compute question ID. + * + * Generated from protobuf field string question_id = 6; + * @return string + */ + public function getQuestionId() + { + return $this->question_id; + } + + /** + * The Crowd Compute question ID. + * + * Generated from protobuf field string question_id = 6; + * @param string $var + * @return $this + */ + public function setQuestionId($var) + { + GPBUtil::checkString($var, True); + $this->question_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentRequest.php new file mode 100644 index 000000000000..a7c6debf806d --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentRequest.php @@ -0,0 +1,247 @@ +google.cloud.documentai.v1.ReviewDocumentRequest + */ +class ReviewDocumentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the + * [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the + * document will be reviewed with. + * + * Generated from protobuf field string human_review_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $human_review_config = ''; + /** + * Whether the validation should be performed on the ad-hoc review request. + * + * Generated from protobuf field bool enable_schema_validation = 3; + */ + protected $enable_schema_validation = false; + /** + * The priority of the human review task. + * + * Generated from protobuf field .google.cloud.documentai.v1.ReviewDocumentRequest.Priority priority = 5; + */ + protected $priority = 0; + /** + * The document schema of the human review task. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema document_schema = 6; + */ + protected $document_schema = null; + protected $source; + + /** + * @param string $humanReviewConfig Required. The resource name of the + * [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the + * document will be reviewed with. Please see + * {@see DocumentProcessorServiceClient::humanReviewConfigName()} for help formatting this field. + * + * @return \Google\Cloud\DocumentAI\V1\ReviewDocumentRequest + * + * @experimental + */ + public static function build(string $humanReviewConfig): self + { + return (new self()) + ->setHumanReviewConfig($humanReviewConfig); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\Document $inline_document + * An inline document proto. + * @type string $human_review_config + * Required. The resource name of the + * [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the + * document will be reviewed with. + * @type bool $enable_schema_validation + * Whether the validation should be performed on the ad-hoc review request. + * @type int $priority + * The priority of the human review task. + * @type \Google\Cloud\DocumentAI\V1\DocumentSchema $document_schema + * The document schema of the human review task. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * An inline document proto. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document inline_document = 4; + * @return \Google\Cloud\DocumentAI\V1\Document|null + */ + public function getInlineDocument() + { + return $this->readOneof(4); + } + + public function hasInlineDocument() + { + return $this->hasOneof(4); + } + + /** + * An inline document proto. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document inline_document = 4; + * @param \Google\Cloud\DocumentAI\V1\Document $var + * @return $this + */ + public function setInlineDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Required. The resource name of the + * [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the + * document will be reviewed with. + * + * Generated from protobuf field string human_review_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getHumanReviewConfig() + { + return $this->human_review_config; + } + + /** + * Required. The resource name of the + * [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the + * document will be reviewed with. + * + * Generated from protobuf field string human_review_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setHumanReviewConfig($var) + { + GPBUtil::checkString($var, True); + $this->human_review_config = $var; + + return $this; + } + + /** + * Whether the validation should be performed on the ad-hoc review request. + * + * Generated from protobuf field bool enable_schema_validation = 3; + * @return bool + */ + public function getEnableSchemaValidation() + { + return $this->enable_schema_validation; + } + + /** + * Whether the validation should be performed on the ad-hoc review request. + * + * Generated from protobuf field bool enable_schema_validation = 3; + * @param bool $var + * @return $this + */ + public function setEnableSchemaValidation($var) + { + GPBUtil::checkBool($var); + $this->enable_schema_validation = $var; + + return $this; + } + + /** + * The priority of the human review task. + * + * Generated from protobuf field .google.cloud.documentai.v1.ReviewDocumentRequest.Priority priority = 5; + * @return int + */ + public function getPriority() + { + return $this->priority; + } + + /** + * The priority of the human review task. + * + * Generated from protobuf field .google.cloud.documentai.v1.ReviewDocumentRequest.Priority priority = 5; + * @param int $var + * @return $this + */ + public function setPriority($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\ReviewDocumentRequest\Priority::class); + $this->priority = $var; + + return $this; + } + + /** + * The document schema of the human review task. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema document_schema = 6; + * @return \Google\Cloud\DocumentAI\V1\DocumentSchema|null + */ + public function getDocumentSchema() + { + return $this->document_schema; + } + + public function hasDocumentSchema() + { + return isset($this->document_schema); + } + + public function clearDocumentSchema() + { + unset($this->document_schema); + } + + /** + * The document schema of the human review task. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema document_schema = 6; + * @param \Google\Cloud\DocumentAI\V1\DocumentSchema $var + * @return $this + */ + public function setDocumentSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\DocumentSchema::class); + $this->document_schema = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentRequest/Priority.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentRequest/Priority.php new file mode 100644 index 000000000000..4cfade81b71a --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentRequest/Priority.php @@ -0,0 +1,59 @@ +google.cloud.documentai.v1.ReviewDocumentRequest.Priority + */ +class Priority +{ + /** + * The default priority level. + * + * Generated from protobuf enum DEFAULT = 0; + */ + const PBDEFAULT = 0; + /** + * The urgent priority level. The labeling manager should allocate labeler + * resource to the urgent task queue to respect this priority level. + * + * Generated from protobuf enum URGENT = 1; + */ + const URGENT = 1; + + private static $valueToName = [ + self::PBDEFAULT => 'DEFAULT', + self::URGENT => 'URGENT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentResponse.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentResponse.php new file mode 100644 index 000000000000..70f2081d7188 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentResponse.php @@ -0,0 +1,141 @@ +google.cloud.documentai.v1.ReviewDocumentResponse + */ +class ReviewDocumentResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The Cloud Storage uri for the human reviewed document if the review is + * succeeded. + * + * Generated from protobuf field string gcs_destination = 1; + */ + protected $gcs_destination = ''; + /** + * The state of the review operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.ReviewDocumentResponse.State state = 2; + */ + protected $state = 0; + /** + * The reason why the review is rejected by reviewer. + * + * Generated from protobuf field string rejection_reason = 3; + */ + protected $rejection_reason = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $gcs_destination + * The Cloud Storage uri for the human reviewed document if the review is + * succeeded. + * @type int $state + * The state of the review operation. + * @type string $rejection_reason + * The reason why the review is rejected by reviewer. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * The Cloud Storage uri for the human reviewed document if the review is + * succeeded. + * + * Generated from protobuf field string gcs_destination = 1; + * @return string + */ + public function getGcsDestination() + { + return $this->gcs_destination; + } + + /** + * The Cloud Storage uri for the human reviewed document if the review is + * succeeded. + * + * Generated from protobuf field string gcs_destination = 1; + * @param string $var + * @return $this + */ + public function setGcsDestination($var) + { + GPBUtil::checkString($var, True); + $this->gcs_destination = $var; + + return $this; + } + + /** + * The state of the review operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.ReviewDocumentResponse.State state = 2; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of the review operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.ReviewDocumentResponse.State state = 2; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\ReviewDocumentResponse\State::class); + $this->state = $var; + + return $this; + } + + /** + * The reason why the review is rejected by reviewer. + * + * Generated from protobuf field string rejection_reason = 3; + * @return string + */ + public function getRejectionReason() + { + return $this->rejection_reason; + } + + /** + * The reason why the review is rejected by reviewer. + * + * Generated from protobuf field string rejection_reason = 3; + * @param string $var + * @return $this + */ + public function setRejectionReason($var) + { + GPBUtil::checkString($var, True); + $this->rejection_reason = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentResponse/State.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentResponse/State.php new file mode 100644 index 000000000000..7ade2c2dbe40 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentResponse/State.php @@ -0,0 +1,61 @@ +google.cloud.documentai.v1.ReviewDocumentResponse.State + */ +class State +{ + /** + * The default value. This value is used if the state is omitted. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The review operation is rejected by the reviewer. + * + * Generated from protobuf enum REJECTED = 1; + */ + const REJECTED = 1; + /** + * The review operation is succeeded. + * + * Generated from protobuf enum SUCCEEDED = 2; + */ + const SUCCEEDED = 2; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::REJECTED => 'REJECTED', + self::SUCCEEDED => 'SUCCEEDED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/SetDefaultProcessorVersionMetadata.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/SetDefaultProcessorVersionMetadata.php new file mode 100644 index 000000000000..0165f85a42b7 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/SetDefaultProcessorVersionMetadata.php @@ -0,0 +1,79 @@ +google.cloud.documentai.v1.SetDefaultProcessorVersionMetadata + */ +class SetDefaultProcessorVersionMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The basic metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; + */ + protected $common_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $common_metadata + * The basic metadata of the long-running operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * The basic metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; + * @return \Google\Cloud\DocumentAI\V1\CommonOperationMetadata|null + */ + public function getCommonMetadata() + { + return $this->common_metadata; + } + + public function hasCommonMetadata() + { + return isset($this->common_metadata); + } + + public function clearCommonMetadata() + { + unset($this->common_metadata); + } + + /** + * The basic metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; + * @param \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $var + * @return $this + */ + public function setCommonMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\CommonOperationMetadata::class); + $this->common_metadata = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/SetDefaultProcessorVersionRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/SetDefaultProcessorVersionRequest.php new file mode 100644 index 000000000000..4338a9d93477 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/SetDefaultProcessorVersionRequest.php @@ -0,0 +1,123 @@ +google.cloud.documentai.v1.SetDefaultProcessorVersionRequest + */ +class SetDefaultProcessorVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the + * [Processor][google.cloud.documentai.v1.Processor] to change default + * version. + * + * Generated from protobuf field string processor = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $processor = ''; + /** + * Required. The resource name of child + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as + * default. Format: + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}` + * + * Generated from protobuf field string default_processor_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $default_processor_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $processor + * Required. The resource name of the + * [Processor][google.cloud.documentai.v1.Processor] to change default + * version. + * @type string $default_processor_version + * Required. The resource name of child + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as + * default. Format: + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the + * [Processor][google.cloud.documentai.v1.Processor] to change default + * version. + * + * Generated from protobuf field string processor = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getProcessor() + { + return $this->processor; + } + + /** + * Required. The resource name of the + * [Processor][google.cloud.documentai.v1.Processor] to change default + * version. + * + * Generated from protobuf field string processor = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setProcessor($var) + { + GPBUtil::checkString($var, True); + $this->processor = $var; + + return $this; + } + + /** + * Required. The resource name of child + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as + * default. Format: + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}` + * + * Generated from protobuf field string default_processor_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getDefaultProcessorVersion() + { + return $this->default_processor_version; + } + + /** + * Required. The resource name of child + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as + * default. Format: + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}` + * + * Generated from protobuf field string default_processor_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDefaultProcessorVersion($var) + { + GPBUtil::checkString($var, True); + $this->default_processor_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/SetDefaultProcessorVersionResponse.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/SetDefaultProcessorVersionResponse.php new file mode 100644 index 000000000000..642596b1ce81 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/SetDefaultProcessorVersionResponse.php @@ -0,0 +1,35 @@ +google.cloud.documentai.v1.SetDefaultProcessorVersionResponse + */ +class SetDefaultProcessorVersionResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionMetadata.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionMetadata.php new file mode 100644 index 000000000000..9ab3e8e3aef6 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionMetadata.php @@ -0,0 +1,165 @@ +google.cloud.documentai.v1.TrainProcessorVersionMetadata + */ +class TrainProcessorVersionMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The basic metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; + */ + protected $common_metadata = null; + /** + * The training dataset validation information. + * + * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation training_dataset_validation = 2; + */ + protected $training_dataset_validation = null; + /** + * The test dataset validation information. + * + * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation test_dataset_validation = 3; + */ + protected $test_dataset_validation = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $common_metadata + * The basic metadata of the long-running operation. + * @type \Google\Cloud\DocumentAI\V1\TrainProcessorVersionMetadata\DatasetValidation $training_dataset_validation + * The training dataset validation information. + * @type \Google\Cloud\DocumentAI\V1\TrainProcessorVersionMetadata\DatasetValidation $test_dataset_validation + * The test dataset validation information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * The basic metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; + * @return \Google\Cloud\DocumentAI\V1\CommonOperationMetadata|null + */ + public function getCommonMetadata() + { + return $this->common_metadata; + } + + public function hasCommonMetadata() + { + return isset($this->common_metadata); + } + + public function clearCommonMetadata() + { + unset($this->common_metadata); + } + + /** + * The basic metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; + * @param \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $var + * @return $this + */ + public function setCommonMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\CommonOperationMetadata::class); + $this->common_metadata = $var; + + return $this; + } + + /** + * The training dataset validation information. + * + * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation training_dataset_validation = 2; + * @return \Google\Cloud\DocumentAI\V1\TrainProcessorVersionMetadata\DatasetValidation|null + */ + public function getTrainingDatasetValidation() + { + return $this->training_dataset_validation; + } + + public function hasTrainingDatasetValidation() + { + return isset($this->training_dataset_validation); + } + + public function clearTrainingDatasetValidation() + { + unset($this->training_dataset_validation); + } + + /** + * The training dataset validation information. + * + * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation training_dataset_validation = 2; + * @param \Google\Cloud\DocumentAI\V1\TrainProcessorVersionMetadata\DatasetValidation $var + * @return $this + */ + public function setTrainingDatasetValidation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\TrainProcessorVersionMetadata\DatasetValidation::class); + $this->training_dataset_validation = $var; + + return $this; + } + + /** + * The test dataset validation information. + * + * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation test_dataset_validation = 3; + * @return \Google\Cloud\DocumentAI\V1\TrainProcessorVersionMetadata\DatasetValidation|null + */ + public function getTestDatasetValidation() + { + return $this->test_dataset_validation; + } + + public function hasTestDatasetValidation() + { + return isset($this->test_dataset_validation); + } + + public function clearTestDatasetValidation() + { + unset($this->test_dataset_validation); + } + + /** + * The test dataset validation information. + * + * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation test_dataset_validation = 3; + * @param \Google\Cloud\DocumentAI\V1\TrainProcessorVersionMetadata\DatasetValidation $var + * @return $this + */ + public function setTestDatasetValidation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\TrainProcessorVersionMetadata\DatasetValidation::class); + $this->test_dataset_validation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionMetadata/DatasetValidation.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionMetadata/DatasetValidation.php new file mode 100644 index 000000000000..9faed1415e3c --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionMetadata/DatasetValidation.php @@ -0,0 +1,186 @@ +google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation + */ +class DatasetValidation extends \Google\Protobuf\Internal\Message +{ + /** + * The total number of document errors. + * + * Generated from protobuf field int32 document_error_count = 3; + */ + protected $document_error_count = 0; + /** + * The total number of dataset errors. + * + * Generated from protobuf field int32 dataset_error_count = 4; + */ + protected $dataset_error_count = 0; + /** + * Error information pertaining to specific documents. A maximum of 10 + * document errors will be returned. + * Any document with errors will not be used throughout training. + * + * Generated from protobuf field repeated .google.rpc.Status document_errors = 1; + */ + private $document_errors; + /** + * Error information for the dataset as a whole. A maximum of 10 dataset + * errors will be returned. + * A single dataset error is terminal for training. + * + * Generated from protobuf field repeated .google.rpc.Status dataset_errors = 2; + */ + private $dataset_errors; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $document_error_count + * The total number of document errors. + * @type int $dataset_error_count + * The total number of dataset errors. + * @type \Google\Rpc\Status[] $document_errors + * Error information pertaining to specific documents. A maximum of 10 + * document errors will be returned. + * Any document with errors will not be used throughout training. + * @type \Google\Rpc\Status[] $dataset_errors + * Error information for the dataset as a whole. A maximum of 10 dataset + * errors will be returned. + * A single dataset error is terminal for training. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * The total number of document errors. + * + * Generated from protobuf field int32 document_error_count = 3; + * @return int + */ + public function getDocumentErrorCount() + { + return $this->document_error_count; + } + + /** + * The total number of document errors. + * + * Generated from protobuf field int32 document_error_count = 3; + * @param int $var + * @return $this + */ + public function setDocumentErrorCount($var) + { + GPBUtil::checkInt32($var); + $this->document_error_count = $var; + + return $this; + } + + /** + * The total number of dataset errors. + * + * Generated from protobuf field int32 dataset_error_count = 4; + * @return int + */ + public function getDatasetErrorCount() + { + return $this->dataset_error_count; + } + + /** + * The total number of dataset errors. + * + * Generated from protobuf field int32 dataset_error_count = 4; + * @param int $var + * @return $this + */ + public function setDatasetErrorCount($var) + { + GPBUtil::checkInt32($var); + $this->dataset_error_count = $var; + + return $this; + } + + /** + * Error information pertaining to specific documents. A maximum of 10 + * document errors will be returned. + * Any document with errors will not be used throughout training. + * + * Generated from protobuf field repeated .google.rpc.Status document_errors = 1; + * @return RepeatedField<\Google\Rpc\Status> + */ + public function getDocumentErrors() + { + return $this->document_errors; + } + + /** + * Error information pertaining to specific documents. A maximum of 10 + * document errors will be returned. + * Any document with errors will not be used throughout training. + * + * Generated from protobuf field repeated .google.rpc.Status document_errors = 1; + * @param \Google\Rpc\Status[] $var + * @return $this + */ + public function setDocumentErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); + $this->document_errors = $arr; + + return $this; + } + + /** + * Error information for the dataset as a whole. A maximum of 10 dataset + * errors will be returned. + * A single dataset error is terminal for training. + * + * Generated from protobuf field repeated .google.rpc.Status dataset_errors = 2; + * @return RepeatedField<\Google\Rpc\Status> + */ + public function getDatasetErrors() + { + return $this->dataset_errors; + } + + /** + * Error information for the dataset as a whole. A maximum of 10 dataset + * errors will be returned. + * A single dataset error is terminal for training. + * + * Generated from protobuf field repeated .google.rpc.Status dataset_errors = 2; + * @param \Google\Rpc\Status[] $var + * @return $this + */ + public function setDatasetErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); + $this->dataset_errors = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest.php new file mode 100644 index 000000000000..67b7a5735ca1 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest.php @@ -0,0 +1,348 @@ +google.cloud.documentai.v1.TrainProcessorVersionRequest + */ +class TrainProcessorVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent (project, location and processor) to create the new + * version for. Format: + * `projects/{project}/locations/{location}/processors/{processor}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The processor version to be created. + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion processor_version = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $processor_version = null; + /** + * Optional. The schema the processor version will be trained with. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema document_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $document_schema = null; + /** + * Optional. The input data used to train the + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. + * + * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $input_data = null; + /** + * Optional. The processor version to use as a base for training. This + * processor version must be a child of `parent`. Format: + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`. + * + * Generated from protobuf field string base_processor_version = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $base_processor_version = ''; + protected $processor_flags; + + /** + * @param string $parent Required. The parent (project, location and processor) to create the new + * version for. Format: + * `projects/{project}/locations/{location}/processors/{processor}`. Please see + * {@see DocumentProcessorServiceClient::processorName()} for help formatting this field. + * @param \Google\Cloud\DocumentAI\V1\ProcessorVersion $processorVersion Required. The processor version to be created. + * + * @return \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\DocumentAI\V1\ProcessorVersion $processorVersion): self + { + return (new self()) + ->setParent($parent) + ->setProcessorVersion($processorVersion); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\CustomDocumentExtractionOptions $custom_document_extraction_options + * Options to control Custom Document Extraction (CDE) Processor. + * @type \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\FoundationModelTuningOptions $foundation_model_tuning_options + * Options to control foundation model tuning of a processor. + * @type string $parent + * Required. The parent (project, location and processor) to create the new + * version for. Format: + * `projects/{project}/locations/{location}/processors/{processor}`. + * @type \Google\Cloud\DocumentAI\V1\ProcessorVersion $processor_version + * Required. The processor version to be created. + * @type \Google\Cloud\DocumentAI\V1\DocumentSchema $document_schema + * Optional. The schema the processor version will be trained with. + * @type \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\InputData $input_data + * Optional. The input data used to train the + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. + * @type string $base_processor_version + * Optional. The processor version to use as a base for training. This + * processor version must be a child of `parent`. Format: + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * Options to control Custom Document Extraction (CDE) Processor. + * + * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions custom_document_extraction_options = 5; + * @return \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\CustomDocumentExtractionOptions|null + */ + public function getCustomDocumentExtractionOptions() + { + return $this->readOneof(5); + } + + public function hasCustomDocumentExtractionOptions() + { + return $this->hasOneof(5); + } + + /** + * Options to control Custom Document Extraction (CDE) Processor. + * + * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions custom_document_extraction_options = 5; + * @param \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\CustomDocumentExtractionOptions $var + * @return $this + */ + public function setCustomDocumentExtractionOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\CustomDocumentExtractionOptions::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Options to control foundation model tuning of a processor. + * + * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.FoundationModelTuningOptions foundation_model_tuning_options = 12; + * @return \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\FoundationModelTuningOptions|null + */ + public function getFoundationModelTuningOptions() + { + return $this->readOneof(12); + } + + public function hasFoundationModelTuningOptions() + { + return $this->hasOneof(12); + } + + /** + * Options to control foundation model tuning of a processor. + * + * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.FoundationModelTuningOptions foundation_model_tuning_options = 12; + * @param \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\FoundationModelTuningOptions $var + * @return $this + */ + public function setFoundationModelTuningOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\FoundationModelTuningOptions::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Required. The parent (project, location and processor) to create the new + * version for. Format: + * `projects/{project}/locations/{location}/processors/{processor}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent (project, location and processor) to create the new + * version for. Format: + * `projects/{project}/locations/{location}/processors/{processor}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The processor version to be created. + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion processor_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DocumentAI\V1\ProcessorVersion|null + */ + public function getProcessorVersion() + { + return $this->processor_version; + } + + public function hasProcessorVersion() + { + return isset($this->processor_version); + } + + public function clearProcessorVersion() + { + unset($this->processor_version); + } + + /** + * Required. The processor version to be created. + * + * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion processor_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DocumentAI\V1\ProcessorVersion $var + * @return $this + */ + public function setProcessorVersion($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\ProcessorVersion::class); + $this->processor_version = $var; + + return $this; + } + + /** + * Optional. The schema the processor version will be trained with. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema document_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\DocumentAI\V1\DocumentSchema|null + */ + public function getDocumentSchema() + { + return $this->document_schema; + } + + public function hasDocumentSchema() + { + return isset($this->document_schema); + } + + public function clearDocumentSchema() + { + unset($this->document_schema); + } + + /** + * Optional. The schema the processor version will be trained with. + * + * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema document_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\DocumentAI\V1\DocumentSchema $var + * @return $this + */ + public function setDocumentSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\DocumentSchema::class); + $this->document_schema = $var; + + return $this; + } + + /** + * Optional. The input data used to train the + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. + * + * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\InputData|null + */ + public function getInputData() + { + return $this->input_data; + } + + public function hasInputData() + { + return isset($this->input_data); + } + + public function clearInputData() + { + unset($this->input_data); + } + + /** + * Optional. The input data used to train the + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. + * + * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\InputData $var + * @return $this + */ + public function setInputData($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\InputData::class); + $this->input_data = $var; + + return $this; + } + + /** + * Optional. The processor version to use as a base for training. This + * processor version must be a child of `parent`. Format: + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`. + * + * Generated from protobuf field string base_processor_version = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getBaseProcessorVersion() + { + return $this->base_processor_version; + } + + /** + * Optional. The processor version to use as a base for training. This + * processor version must be a child of `parent`. Format: + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`. + * + * Generated from protobuf field string base_processor_version = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setBaseProcessorVersion($var) + { + GPBUtil::checkString($var, True); + $this->base_processor_version = $var; + + return $this; + } + + /** + * @return string + */ + public function getProcessorFlags() + { + return $this->whichOneof("processor_flags"); + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/CustomDocumentExtractionOptions.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/CustomDocumentExtractionOptions.php new file mode 100644 index 000000000000..f139d14ab13b --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/CustomDocumentExtractionOptions.php @@ -0,0 +1,68 @@ +google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions + */ +class CustomDocumentExtractionOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Training method to use for CDE training. + * + * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions.TrainingMethod training_method = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $training_method = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $training_method + * Optional. Training method to use for CDE training. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Training method to use for CDE training. + * + * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions.TrainingMethod training_method = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getTrainingMethod() + { + return $this->training_method; + } + + /** + * Optional. Training method to use for CDE training. + * + * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions.TrainingMethod training_method = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setTrainingMethod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\CustomDocumentExtractionOptions\TrainingMethod::class); + $this->training_method = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/CustomDocumentExtractionOptions/TrainingMethod.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/CustomDocumentExtractionOptions/TrainingMethod.php new file mode 100644 index 000000000000..fb24b9210ca5 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/CustomDocumentExtractionOptions/TrainingMethod.php @@ -0,0 +1,56 @@ +google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions.TrainingMethod + */ +class TrainingMethod +{ + /** + * Generated from protobuf enum TRAINING_METHOD_UNSPECIFIED = 0; + */ + const TRAINING_METHOD_UNSPECIFIED = 0; + /** + * Generated from protobuf enum MODEL_BASED = 1; + */ + const MODEL_BASED = 1; + /** + * Generated from protobuf enum TEMPLATE_BASED = 2; + */ + const TEMPLATE_BASED = 2; + + private static $valueToName = [ + self::TRAINING_METHOD_UNSPECIFIED => 'TRAINING_METHOD_UNSPECIFIED', + self::MODEL_BASED => 'MODEL_BASED', + self::TEMPLATE_BASED => 'TEMPLATE_BASED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/FoundationModelTuningOptions.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/FoundationModelTuningOptions.php new file mode 100644 index 000000000000..3de51e676c4a --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/FoundationModelTuningOptions.php @@ -0,0 +1,113 @@ +google.cloud.documentai.v1.TrainProcessorVersionRequest.FoundationModelTuningOptions + */ +class FoundationModelTuningOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The number of steps to run for model tuning. Valid values are + * between 1 and 400. If not provided, recommended steps will be used. + * + * Generated from protobuf field int32 train_steps = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $train_steps = 0; + /** + * Optional. The multiplier to apply to the recommended learning rate. Valid + * values are between 0.1 and 10. If not provided, recommended learning rate + * will be used. + * + * Generated from protobuf field float learning_rate_multiplier = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $learning_rate_multiplier = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $train_steps + * Optional. The number of steps to run for model tuning. Valid values are + * between 1 and 400. If not provided, recommended steps will be used. + * @type float $learning_rate_multiplier + * Optional. The multiplier to apply to the recommended learning rate. Valid + * values are between 0.1 and 10. If not provided, recommended learning rate + * will be used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The number of steps to run for model tuning. Valid values are + * between 1 and 400. If not provided, recommended steps will be used. + * + * Generated from protobuf field int32 train_steps = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getTrainSteps() + { + return $this->train_steps; + } + + /** + * Optional. The number of steps to run for model tuning. Valid values are + * between 1 and 400. If not provided, recommended steps will be used. + * + * Generated from protobuf field int32 train_steps = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setTrainSteps($var) + { + GPBUtil::checkInt32($var); + $this->train_steps = $var; + + return $this; + } + + /** + * Optional. The multiplier to apply to the recommended learning rate. Valid + * values are between 0.1 and 10. If not provided, recommended learning rate + * will be used. + * + * Generated from protobuf field float learning_rate_multiplier = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getLearningRateMultiplier() + { + return $this->learning_rate_multiplier; + } + + /** + * Optional. The multiplier to apply to the recommended learning rate. Valid + * values are between 0.1 and 10. If not provided, recommended learning rate + * will be used. + * + * Generated from protobuf field float learning_rate_multiplier = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setLearningRateMultiplier($var) + { + GPBUtil::checkFloat($var); + $this->learning_rate_multiplier = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/InputData.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/InputData.php new file mode 100644 index 000000000000..3a05f4d06602 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/InputData.php @@ -0,0 +1,122 @@ +google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData + */ +class InputData extends \Google\Protobuf\Internal\Message +{ + /** + * The documents used for training the new version. + * + * Generated from protobuf field .google.cloud.documentai.v1.BatchDocumentsInputConfig training_documents = 3; + */ + protected $training_documents = null; + /** + * The documents used for testing the trained version. + * + * Generated from protobuf field .google.cloud.documentai.v1.BatchDocumentsInputConfig test_documents = 4; + */ + protected $test_documents = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig $training_documents + * The documents used for training the new version. + * @type \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig $test_documents + * The documents used for testing the trained version. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * The documents used for training the new version. + * + * Generated from protobuf field .google.cloud.documentai.v1.BatchDocumentsInputConfig training_documents = 3; + * @return \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig|null + */ + public function getTrainingDocuments() + { + return $this->training_documents; + } + + public function hasTrainingDocuments() + { + return isset($this->training_documents); + } + + public function clearTrainingDocuments() + { + unset($this->training_documents); + } + + /** + * The documents used for training the new version. + * + * Generated from protobuf field .google.cloud.documentai.v1.BatchDocumentsInputConfig training_documents = 3; + * @param \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig $var + * @return $this + */ + public function setTrainingDocuments($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig::class); + $this->training_documents = $var; + + return $this; + } + + /** + * The documents used for testing the trained version. + * + * Generated from protobuf field .google.cloud.documentai.v1.BatchDocumentsInputConfig test_documents = 4; + * @return \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig|null + */ + public function getTestDocuments() + { + return $this->test_documents; + } + + public function hasTestDocuments() + { + return isset($this->test_documents); + } + + public function clearTestDocuments() + { + unset($this->test_documents); + } + + /** + * The documents used for testing the trained version. + * + * Generated from protobuf field .google.cloud.documentai.v1.BatchDocumentsInputConfig test_documents = 4; + * @param \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig $var + * @return $this + */ + public function setTestDocuments($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig::class); + $this->test_documents = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionResponse.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionResponse.php new file mode 100644 index 000000000000..628a57ae7aa4 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionResponse.php @@ -0,0 +1,68 @@ +google.cloud.documentai.v1.TrainProcessorVersionResponse + */ +class TrainProcessorVersionResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the processor version produced by training. + * + * Generated from protobuf field string processor_version = 1; + */ + protected $processor_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $processor_version + * The resource name of the processor version produced by training. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the processor version produced by training. + * + * Generated from protobuf field string processor_version = 1; + * @return string + */ + public function getProcessorVersion() + { + return $this->processor_version; + } + + /** + * The resource name of the processor version produced by training. + * + * Generated from protobuf field string processor_version = 1; + * @param string $var + * @return $this + */ + public function setProcessorVersion($var) + { + GPBUtil::checkString($var, True); + $this->processor_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/UndeployProcessorVersionMetadata.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/UndeployProcessorVersionMetadata.php new file mode 100644 index 000000000000..4195aafdb4c4 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/UndeployProcessorVersionMetadata.php @@ -0,0 +1,79 @@ +google.cloud.documentai.v1.UndeployProcessorVersionMetadata + */ +class UndeployProcessorVersionMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The basic metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; + */ + protected $common_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $common_metadata + * The basic metadata of the long-running operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * The basic metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; + * @return \Google\Cloud\DocumentAI\V1\CommonOperationMetadata|null + */ + public function getCommonMetadata() + { + return $this->common_metadata; + } + + public function hasCommonMetadata() + { + return isset($this->common_metadata); + } + + public function clearCommonMetadata() + { + unset($this->common_metadata); + } + + /** + * The basic metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; + * @param \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $var + * @return $this + */ + public function setCommonMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\CommonOperationMetadata::class); + $this->common_metadata = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/UndeployProcessorVersionRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/UndeployProcessorVersionRequest.php new file mode 100644 index 000000000000..7bce922ac002 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/UndeployProcessorVersionRequest.php @@ -0,0 +1,83 @@ +google.cloud.documentai.v1.UndeployProcessorVersionRequest + */ +class UndeployProcessorVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The processor version resource name to be undeployed. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The processor version resource name to be undeployed. Please see + * {@see DocumentProcessorServiceClient::processorVersionName()} for help formatting this field. + * + * @return \Google\Cloud\DocumentAI\V1\UndeployProcessorVersionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The processor version resource name to be undeployed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The processor version resource name to be undeployed. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The processor version resource name to be undeployed. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/UndeployProcessorVersionResponse.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/UndeployProcessorVersionResponse.php new file mode 100644 index 000000000000..4d2bf8fb8f95 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/UndeployProcessorVersionResponse.php @@ -0,0 +1,35 @@ +google.cloud.documentai.v1.UndeployProcessorVersionResponse + */ +class UndeployProcessorVersionResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Vertex.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Vertex.php new file mode 100644 index 000000000000..a9387c48fb1d --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Vertex.php @@ -0,0 +1,102 @@ +google.cloud.documentai.v1.Vertex + */ +class Vertex extends \Google\Protobuf\Internal\Message +{ + /** + * X coordinate. + * + * Generated from protobuf field int32 x = 1; + */ + protected $x = 0; + /** + * Y coordinate (starts from the top of the image). + * + * Generated from protobuf field int32 y = 2; + */ + protected $y = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $x + * X coordinate. + * @type int $y + * Y coordinate (starts from the top of the image). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\Geometry::initOnce(); + parent::__construct($data); + } + + /** + * X coordinate. + * + * Generated from protobuf field int32 x = 1; + * @return int + */ + public function getX() + { + return $this->x; + } + + /** + * X coordinate. + * + * Generated from protobuf field int32 x = 1; + * @param int $var + * @return $this + */ + public function setX($var) + { + GPBUtil::checkInt32($var); + $this->x = $var; + + return $this; + } + + /** + * Y coordinate (starts from the top of the image). + * + * Generated from protobuf field int32 y = 2; + * @return int + */ + public function getY() + { + return $this->y; + } + + /** + * Y coordinate (starts from the top of the image). + * + * Generated from protobuf field int32 y = 2; + * @param int $var + * @return $this + */ + public function setY($var) + { + GPBUtil::checkInt32($var); + $this->y = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/batch_process_documents.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/batch_process_documents.php new file mode 100644 index 000000000000..58507a4e5a90 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/batch_process_documents.php @@ -0,0 +1,88 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $documentProcessorServiceClient->batchProcessDocuments($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BatchProcessResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + batch_process_documents_sample($name); +} +// [END documentai_v1_generated_DocumentProcessorService_BatchProcessDocuments_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/create_processor.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/create_processor.php new file mode 100644 index 000000000000..e0d182885ae9 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/create_processor.php @@ -0,0 +1,80 @@ +setParent($formattedParent) + ->setProcessor($processor); + + // Call the API and handle any network failures. + try { + /** @var Processor $response */ + $response = $documentProcessorServiceClient->createProcessor($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DocumentProcessorServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + create_processor_sample($formattedParent); +} +// [END documentai_v1_generated_DocumentProcessorService_CreateProcessor_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/delete_processor.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/delete_processor.php new file mode 100644 index 000000000000..cab1519c2dc9 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/delete_processor.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $documentProcessorServiceClient->deleteProcessor($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DocumentProcessorServiceClient::processorName( + '[PROJECT]', + '[LOCATION]', + '[PROCESSOR]' + ); + + delete_processor_sample($formattedName); +} +// [END documentai_v1_generated_DocumentProcessorService_DeleteProcessor_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/delete_processor_version.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/delete_processor_version.php new file mode 100644 index 000000000000..cb5ae7c322ad --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/delete_processor_version.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $documentProcessorServiceClient->deleteProcessorVersion($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DocumentProcessorServiceClient::processorVersionName( + '[PROJECT]', + '[LOCATION]', + '[PROCESSOR]', + '[PROCESSOR_VERSION]' + ); + + delete_processor_version_sample($formattedName); +} +// [END documentai_v1_generated_DocumentProcessorService_DeleteProcessorVersion_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/deploy_processor_version.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/deploy_processor_version.php new file mode 100644 index 000000000000..57b8e40f8544 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/deploy_processor_version.php @@ -0,0 +1,88 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $documentProcessorServiceClient->deployProcessorVersion($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var DeployProcessorVersionResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DocumentProcessorServiceClient::processorVersionName( + '[PROJECT]', + '[LOCATION]', + '[PROCESSOR]', + '[PROCESSOR_VERSION]' + ); + + deploy_processor_version_sample($formattedName); +} +// [END documentai_v1_generated_DocumentProcessorService_DeployProcessorVersion_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/disable_processor.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/disable_processor.php new file mode 100644 index 000000000000..04cebfddfc15 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/disable_processor.php @@ -0,0 +1,87 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $documentProcessorServiceClient->disableProcessor($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var DisableProcessorResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DocumentProcessorServiceClient::processorName( + '[PROJECT]', + '[LOCATION]', + '[PROCESSOR]' + ); + + disable_processor_sample($formattedName); +} +// [END documentai_v1_generated_DocumentProcessorService_DisableProcessor_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/enable_processor.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/enable_processor.php new file mode 100644 index 000000000000..b371e96e54e2 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/enable_processor.php @@ -0,0 +1,87 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $documentProcessorServiceClient->enableProcessor($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var EnableProcessorResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DocumentProcessorServiceClient::processorName( + '[PROJECT]', + '[LOCATION]', + '[PROCESSOR]' + ); + + enable_processor_sample($formattedName); +} +// [END documentai_v1_generated_DocumentProcessorService_EnableProcessor_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/evaluate_processor_version.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/evaluate_processor_version.php new file mode 100644 index 000000000000..53bda33d1e8a --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/evaluate_processor_version.php @@ -0,0 +1,92 @@ +setProcessorVersion($formattedProcessorVersion); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $documentProcessorServiceClient->evaluateProcessorVersion($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var EvaluateProcessorVersionResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedProcessorVersion = DocumentProcessorServiceClient::processorVersionName( + '[PROJECT]', + '[LOCATION]', + '[PROCESSOR]', + '[PROCESSOR_VERSION]' + ); + + evaluate_processor_version_sample($formattedProcessorVersion); +} +// [END documentai_v1_generated_DocumentProcessorService_EvaluateProcessorVersion_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/fetch_processor_types.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/fetch_processor_types.php new file mode 100644 index 000000000000..8a1c19c06876 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/fetch_processor_types.php @@ -0,0 +1,74 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var FetchProcessorTypesResponse $response */ + $response = $documentProcessorServiceClient->fetchProcessorTypes($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DocumentProcessorServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + fetch_processor_types_sample($formattedParent); +} +// [END documentai_v1_generated_DocumentProcessorService_FetchProcessorTypes_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_evaluation.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_evaluation.php new file mode 100644 index 000000000000..175385d1151e --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_evaluation.php @@ -0,0 +1,79 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Evaluation $response */ + $response = $documentProcessorServiceClient->getEvaluation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DocumentProcessorServiceClient::evaluationName( + '[PROJECT]', + '[LOCATION]', + '[PROCESSOR]', + '[PROCESSOR_VERSION]', + '[EVALUATION]' + ); + + get_evaluation_sample($formattedName); +} +// [END documentai_v1_generated_DocumentProcessorService_GetEvaluation_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_location.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_location.php new file mode 100644 index 000000000000..41d29f8bc513 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END documentai_v1_generated_DocumentProcessorService_GetLocation_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_processor.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_processor.php new file mode 100644 index 000000000000..644e5c9b1917 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_processor.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Processor $response */ + $response = $documentProcessorServiceClient->getProcessor($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DocumentProcessorServiceClient::processorName( + '[PROJECT]', + '[LOCATION]', + '[PROCESSOR]' + ); + + get_processor_sample($formattedName); +} +// [END documentai_v1_generated_DocumentProcessorService_GetProcessor_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_processor_type.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_processor_type.php new file mode 100644 index 000000000000..b040e2fcac4d --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_processor_type.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ProcessorType $response */ + $response = $documentProcessorServiceClient->getProcessorType($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DocumentProcessorServiceClient::processorTypeName( + '[PROJECT]', + '[LOCATION]', + '[PROCESSOR_TYPE]' + ); + + get_processor_type_sample($formattedName); +} +// [END documentai_v1_generated_DocumentProcessorService_GetProcessorType_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_processor_version.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_processor_version.php new file mode 100644 index 000000000000..29fd9e7194c9 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_processor_version.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ProcessorVersion $response */ + $response = $documentProcessorServiceClient->getProcessorVersion($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DocumentProcessorServiceClient::processorVersionName( + '[PROJECT]', + '[LOCATION]', + '[PROCESSOR]', + '[PROCESSOR_VERSION]' + ); + + get_processor_version_sample($formattedName); +} +// [END documentai_v1_generated_DocumentProcessorService_GetProcessorVersion_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_evaluations.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_evaluations.php new file mode 100644 index 000000000000..db3f075b1fe5 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_evaluations.php @@ -0,0 +1,84 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $documentProcessorServiceClient->listEvaluations($request); + + /** @var Evaluation $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DocumentProcessorServiceClient::processorVersionName( + '[PROJECT]', + '[LOCATION]', + '[PROCESSOR]', + '[PROCESSOR_VERSION]' + ); + + list_evaluations_sample($formattedParent); +} +// [END documentai_v1_generated_DocumentProcessorService_ListEvaluations_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_locations.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_locations.php new file mode 100644 index 000000000000..fa458750d39c --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END documentai_v1_generated_DocumentProcessorService_ListLocations_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_processor_types.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_processor_types.php new file mode 100644 index 000000000000..3b2c170f5e49 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_processor_types.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $documentProcessorServiceClient->listProcessorTypes($request); + + /** @var ProcessorType $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DocumentProcessorServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_processor_types_sample($formattedParent); +} +// [END documentai_v1_generated_DocumentProcessorService_ListProcessorTypes_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_processor_versions.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_processor_versions.php new file mode 100644 index 000000000000..a7d3a94b13f3 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_processor_versions.php @@ -0,0 +1,82 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $documentProcessorServiceClient->listProcessorVersions($request); + + /** @var ProcessorVersion $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DocumentProcessorServiceClient::processorName( + '[PROJECT]', + '[LOCATION]', + '[PROCESSOR]' + ); + + list_processor_versions_sample($formattedParent); +} +// [END documentai_v1_generated_DocumentProcessorService_ListProcessorVersions_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_processors.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_processors.php new file mode 100644 index 000000000000..d1cace4df1de --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_processors.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $documentProcessorServiceClient->listProcessors($request); + + /** @var Processor $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DocumentProcessorServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_processors_sample($formattedParent); +} +// [END documentai_v1_generated_DocumentProcessorService_ListProcessors_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/process_document.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/process_document.php new file mode 100644 index 000000000000..af25f661244c --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/process_document.php @@ -0,0 +1,79 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var ProcessResponse $response */ + $response = $documentProcessorServiceClient->processDocument($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + process_document_sample($name); +} +// [END documentai_v1_generated_DocumentProcessorService_ProcessDocument_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/review_document.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/review_document.php new file mode 100644 index 000000000000..a07ae3fcfce0 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/review_document.php @@ -0,0 +1,90 @@ +setHumanReviewConfig($formattedHumanReviewConfig); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $documentProcessorServiceClient->reviewDocument($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ReviewDocumentResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedHumanReviewConfig = DocumentProcessorServiceClient::humanReviewConfigName( + '[PROJECT]', + '[LOCATION]', + '[PROCESSOR]' + ); + + review_document_sample($formattedHumanReviewConfig); +} +// [END documentai_v1_generated_DocumentProcessorService_ReviewDocument_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/set_default_processor_version.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/set_default_processor_version.php new file mode 100644 index 000000000000..ef3d6f72248c --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/set_default_processor_version.php @@ -0,0 +1,107 @@ +setProcessor($formattedProcessor) + ->setDefaultProcessorVersion($formattedDefaultProcessorVersion); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $documentProcessorServiceClient->setDefaultProcessorVersion($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var SetDefaultProcessorVersionResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedProcessor = DocumentProcessorServiceClient::processorName( + '[PROJECT]', + '[LOCATION]', + '[PROCESSOR]' + ); + $formattedDefaultProcessorVersion = DocumentProcessorServiceClient::processorVersionName( + '[PROJECT]', + '[LOCATION]', + '[PROCESSOR]', + '[PROCESSOR_VERSION]' + ); + + set_default_processor_version_sample($formattedProcessor, $formattedDefaultProcessorVersion); +} +// [END documentai_v1_generated_DocumentProcessorService_SetDefaultProcessorVersion_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/train_processor_version.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/train_processor_version.php new file mode 100644 index 000000000000..0f1fdb0d692b --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/train_processor_version.php @@ -0,0 +1,94 @@ +setParent($formattedParent) + ->setProcessorVersion($processorVersion); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $documentProcessorServiceClient->trainProcessorVersion($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var TrainProcessorVersionResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DocumentProcessorServiceClient::processorName( + '[PROJECT]', + '[LOCATION]', + '[PROCESSOR]' + ); + + train_processor_version_sample($formattedParent); +} +// [END documentai_v1_generated_DocumentProcessorService_TrainProcessorVersion_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/undeploy_processor_version.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/undeploy_processor_version.php new file mode 100644 index 000000000000..1c19d8dda5cc --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/undeploy_processor_version.php @@ -0,0 +1,88 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $documentProcessorServiceClient->undeployProcessorVersion($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var UndeployProcessorVersionResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DocumentProcessorServiceClient::processorVersionName( + '[PROJECT]', + '[LOCATION]', + '[PROCESSOR]', + '[PROCESSOR_VERSION]' + ); + + undeploy_processor_version_sample($formattedName); +} +// [END documentai_v1_generated_DocumentProcessorService_UndeployProcessorVersion_sync] diff --git a/owl-bot-staging/DocumentAi/v1/src/V1/Client/DocumentProcessorServiceClient.php b/owl-bot-staging/DocumentAi/v1/src/V1/Client/DocumentProcessorServiceClient.php new file mode 100644 index 000000000000..20a75a903dd1 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/src/V1/Client/DocumentProcessorServiceClient.php @@ -0,0 +1,1119 @@ + batchProcessDocumentsAsync(BatchProcessRequest $request, array $optionalArgs = []) + * @method PromiseInterface createProcessorAsync(CreateProcessorRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteProcessorAsync(DeleteProcessorRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteProcessorVersionAsync(DeleteProcessorVersionRequest $request, array $optionalArgs = []) + * @method PromiseInterface deployProcessorVersionAsync(DeployProcessorVersionRequest $request, array $optionalArgs = []) + * @method PromiseInterface disableProcessorAsync(DisableProcessorRequest $request, array $optionalArgs = []) + * @method PromiseInterface enableProcessorAsync(EnableProcessorRequest $request, array $optionalArgs = []) + * @method PromiseInterface evaluateProcessorVersionAsync(EvaluateProcessorVersionRequest $request, array $optionalArgs = []) + * @method PromiseInterface fetchProcessorTypesAsync(FetchProcessorTypesRequest $request, array $optionalArgs = []) + * @method PromiseInterface getEvaluationAsync(GetEvaluationRequest $request, array $optionalArgs = []) + * @method PromiseInterface getProcessorAsync(GetProcessorRequest $request, array $optionalArgs = []) + * @method PromiseInterface getProcessorTypeAsync(GetProcessorTypeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getProcessorVersionAsync(GetProcessorVersionRequest $request, array $optionalArgs = []) + * @method PromiseInterface listEvaluationsAsync(ListEvaluationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listProcessorTypesAsync(ListProcessorTypesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listProcessorVersionsAsync(ListProcessorVersionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listProcessorsAsync(ListProcessorsRequest $request, array $optionalArgs = []) + * @method PromiseInterface processDocumentAsync(ProcessRequest $request, array $optionalArgs = []) + * @method PromiseInterface reviewDocumentAsync(ReviewDocumentRequest $request, array $optionalArgs = []) + * @method PromiseInterface setDefaultProcessorVersionAsync(SetDefaultProcessorVersionRequest $request, array $optionalArgs = []) + * @method PromiseInterface trainProcessorVersionAsync(TrainProcessorVersionRequest $request, array $optionalArgs = []) + * @method PromiseInterface undeployProcessorVersionAsync(UndeployProcessorVersionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class DocumentProcessorServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.documentai.v1.DocumentProcessorService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'documentai.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'documentai.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/document_processor_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/document_processor_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/document_processor_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/document_processor_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a evaluation + * resource. + * + * @param string $project + * @param string $location + * @param string $processor + * @param string $processorVersion + * @param string $evaluation + * + * @return string The formatted evaluation resource. + */ + public static function evaluationName(string $project, string $location, string $processor, string $processorVersion, string $evaluation): string + { + return self::getPathTemplate('evaluation')->render([ + 'project' => $project, + 'location' => $location, + 'processor' => $processor, + 'processor_version' => $processorVersion, + 'evaluation' => $evaluation, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * human_review_config resource. + * + * @param string $project + * @param string $location + * @param string $processor + * + * @return string The formatted human_review_config resource. + */ + public static function humanReviewConfigName(string $project, string $location, string $processor): string + { + return self::getPathTemplate('humanReviewConfig')->render([ + 'project' => $project, + 'location' => $location, + 'processor' => $processor, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a processor + * resource. + * + * @param string $project + * @param string $location + * @param string $processor + * + * @return string The formatted processor resource. + */ + public static function processorName(string $project, string $location, string $processor): string + { + return self::getPathTemplate('processor')->render([ + 'project' => $project, + 'location' => $location, + 'processor' => $processor, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * processor_type resource. + * + * @param string $project + * @param string $location + * @param string $processorType + * + * @return string The formatted processor_type resource. + */ + public static function processorTypeName(string $project, string $location, string $processorType): string + { + return self::getPathTemplate('processorType')->render([ + 'project' => $project, + 'location' => $location, + 'processor_type' => $processorType, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * processor_version resource. + * + * @param string $project + * @param string $location + * @param string $processor + * @param string $processorVersion + * + * @return string The formatted processor_version resource. + */ + public static function processorVersionName(string $project, string $location, string $processor, string $processorVersion): string + { + return self::getPathTemplate('processorVersion')->render([ + 'project' => $project, + 'location' => $location, + 'processor' => $processor, + 'processor_version' => $processorVersion, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - evaluation: projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation} + * - humanReviewConfig: projects/{project}/locations/{location}/processors/{processor}/humanReviewConfig + * - location: projects/{project}/locations/{location} + * - processor: projects/{project}/locations/{location}/processors/{processor} + * - processorType: projects/{project}/locations/{location}/processorTypes/{processor_type} + * - processorVersion: projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'documentai.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\DocumentAI\V1\DocumentProcessorServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new DocumentProcessorServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * LRO endpoint to batch process many documents. The output is written + * to Cloud Storage as JSON in the [Document] format. + * + * The async variant is + * {@see DocumentProcessorServiceClient::batchProcessDocumentsAsync()} . + * + * @example samples/V1/DocumentProcessorServiceClient/batch_process_documents.php + * + * @param BatchProcessRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchProcessDocuments(BatchProcessRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('BatchProcessDocuments', $request, $callOptions)->wait(); + } + + /** + * Creates a processor from the + * [ProcessorType][google.cloud.documentai.v1.ProcessorType] provided. The + * processor will be at `ENABLED` state by default after its creation. Note + * that this method requires the `documentai.processors.create` permission on + * the project, which is highly privileged. A user or service account with + * this permission can create new processors that can interact with any gcs + * bucket in your project. + * + * The async variant is + * {@see DocumentProcessorServiceClient::createProcessorAsync()} . + * + * @example samples/V1/DocumentProcessorServiceClient/create_processor.php + * + * @param CreateProcessorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Processor + * + * @throws ApiException Thrown if the API call fails. + */ + public function createProcessor(CreateProcessorRequest $request, array $callOptions = []): Processor + { + return $this->startApiCall('CreateProcessor', $request, $callOptions)->wait(); + } + + /** + * Deletes the processor, unloads all deployed model artifacts if it was + * enabled and then deletes all artifacts associated with this processor. + * + * The async variant is + * {@see DocumentProcessorServiceClient::deleteProcessorAsync()} . + * + * @example samples/V1/DocumentProcessorServiceClient/delete_processor.php + * + * @param DeleteProcessorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteProcessor(DeleteProcessorRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteProcessor', $request, $callOptions)->wait(); + } + + /** + * Deletes the processor version, all artifacts under the processor version + * will be deleted. + * + * The async variant is + * {@see DocumentProcessorServiceClient::deleteProcessorVersionAsync()} . + * + * @example samples/V1/DocumentProcessorServiceClient/delete_processor_version.php + * + * @param DeleteProcessorVersionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteProcessorVersion(DeleteProcessorVersionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteProcessorVersion', $request, $callOptions)->wait(); + } + + /** + * Deploys the processor version. + * + * The async variant is + * {@see DocumentProcessorServiceClient::deployProcessorVersionAsync()} . + * + * @example samples/V1/DocumentProcessorServiceClient/deploy_processor_version.php + * + * @param DeployProcessorVersionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deployProcessorVersion(DeployProcessorVersionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeployProcessorVersion', $request, $callOptions)->wait(); + } + + /** + * Disables a processor + * + * The async variant is + * {@see DocumentProcessorServiceClient::disableProcessorAsync()} . + * + * @example samples/V1/DocumentProcessorServiceClient/disable_processor.php + * + * @param DisableProcessorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function disableProcessor(DisableProcessorRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DisableProcessor', $request, $callOptions)->wait(); + } + + /** + * Enables a processor + * + * The async variant is + * {@see DocumentProcessorServiceClient::enableProcessorAsync()} . + * + * @example samples/V1/DocumentProcessorServiceClient/enable_processor.php + * + * @param EnableProcessorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function enableProcessor(EnableProcessorRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('EnableProcessor', $request, $callOptions)->wait(); + } + + /** + * Evaluates a ProcessorVersion against annotated documents, producing an + * Evaluation. + * + * The async variant is + * {@see DocumentProcessorServiceClient::evaluateProcessorVersionAsync()} . + * + * @example samples/V1/DocumentProcessorServiceClient/evaluate_processor_version.php + * + * @param EvaluateProcessorVersionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function evaluateProcessorVersion(EvaluateProcessorVersionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('EvaluateProcessorVersion', $request, $callOptions)->wait(); + } + + /** + * Fetches processor types. Note that we don't use + * [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes] + * here, because it isn't paginated. + * + * The async variant is + * {@see DocumentProcessorServiceClient::fetchProcessorTypesAsync()} . + * + * @example samples/V1/DocumentProcessorServiceClient/fetch_processor_types.php + * + * @param FetchProcessorTypesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return FetchProcessorTypesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function fetchProcessorTypes(FetchProcessorTypesRequest $request, array $callOptions = []): FetchProcessorTypesResponse + { + return $this->startApiCall('FetchProcessorTypes', $request, $callOptions)->wait(); + } + + /** + * Retrieves a specific evaluation. + * + * The async variant is {@see DocumentProcessorServiceClient::getEvaluationAsync()} + * . + * + * @example samples/V1/DocumentProcessorServiceClient/get_evaluation.php + * + * @param GetEvaluationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Evaluation + * + * @throws ApiException Thrown if the API call fails. + */ + public function getEvaluation(GetEvaluationRequest $request, array $callOptions = []): Evaluation + { + return $this->startApiCall('GetEvaluation', $request, $callOptions)->wait(); + } + + /** + * Gets a processor detail. + * + * The async variant is {@see DocumentProcessorServiceClient::getProcessorAsync()} + * . + * + * @example samples/V1/DocumentProcessorServiceClient/get_processor.php + * + * @param GetProcessorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Processor + * + * @throws ApiException Thrown if the API call fails. + */ + public function getProcessor(GetProcessorRequest $request, array $callOptions = []): Processor + { + return $this->startApiCall('GetProcessor', $request, $callOptions)->wait(); + } + + /** + * Gets a processor type detail. + * + * The async variant is + * {@see DocumentProcessorServiceClient::getProcessorTypeAsync()} . + * + * @example samples/V1/DocumentProcessorServiceClient/get_processor_type.php + * + * @param GetProcessorTypeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ProcessorType + * + * @throws ApiException Thrown if the API call fails. + */ + public function getProcessorType(GetProcessorTypeRequest $request, array $callOptions = []): ProcessorType + { + return $this->startApiCall('GetProcessorType', $request, $callOptions)->wait(); + } + + /** + * Gets a processor version detail. + * + * The async variant is + * {@see DocumentProcessorServiceClient::getProcessorVersionAsync()} . + * + * @example samples/V1/DocumentProcessorServiceClient/get_processor_version.php + * + * @param GetProcessorVersionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ProcessorVersion + * + * @throws ApiException Thrown if the API call fails. + */ + public function getProcessorVersion(GetProcessorVersionRequest $request, array $callOptions = []): ProcessorVersion + { + return $this->startApiCall('GetProcessorVersion', $request, $callOptions)->wait(); + } + + /** + * Retrieves a set of evaluations for a given processor version. + * + * The async variant is + * {@see DocumentProcessorServiceClient::listEvaluationsAsync()} . + * + * @example samples/V1/DocumentProcessorServiceClient/list_evaluations.php + * + * @param ListEvaluationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listEvaluations(ListEvaluationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListEvaluations', $request, $callOptions); + } + + /** + * Lists the processor types that exist. + * + * The async variant is + * {@see DocumentProcessorServiceClient::listProcessorTypesAsync()} . + * + * @example samples/V1/DocumentProcessorServiceClient/list_processor_types.php + * + * @param ListProcessorTypesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listProcessorTypes(ListProcessorTypesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListProcessorTypes', $request, $callOptions); + } + + /** + * Lists all versions of a processor. + * + * The async variant is + * {@see DocumentProcessorServiceClient::listProcessorVersionsAsync()} . + * + * @example samples/V1/DocumentProcessorServiceClient/list_processor_versions.php + * + * @param ListProcessorVersionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listProcessorVersions(ListProcessorVersionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListProcessorVersions', $request, $callOptions); + } + + /** + * Lists all processors which belong to this project. + * + * The async variant is + * {@see DocumentProcessorServiceClient::listProcessorsAsync()} . + * + * @example samples/V1/DocumentProcessorServiceClient/list_processors.php + * + * @param ListProcessorsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listProcessors(ListProcessorsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListProcessors', $request, $callOptions); + } + + /** + * Processes a single document. + * + * The async variant is + * {@see DocumentProcessorServiceClient::processDocumentAsync()} . + * + * @example samples/V1/DocumentProcessorServiceClient/process_document.php + * + * @param ProcessRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ProcessResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function processDocument(ProcessRequest $request, array $callOptions = []): ProcessResponse + { + return $this->startApiCall('ProcessDocument', $request, $callOptions)->wait(); + } + + /** + * Send a document for Human Review. The input document should be processed by + * the specified processor. + * + * The async variant is + * {@see DocumentProcessorServiceClient::reviewDocumentAsync()} . + * + * @example samples/V1/DocumentProcessorServiceClient/review_document.php + * + * @param ReviewDocumentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function reviewDocument(ReviewDocumentRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ReviewDocument', $request, $callOptions)->wait(); + } + + /** + * Set the default (active) version of a + * [Processor][google.cloud.documentai.v1.Processor] that will be used in + * [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] + * and + * [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments]. + * + * The async variant is + * {@see DocumentProcessorServiceClient::setDefaultProcessorVersionAsync()} . + * + * @example samples/V1/DocumentProcessorServiceClient/set_default_processor_version.php + * + * @param SetDefaultProcessorVersionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function setDefaultProcessorVersion(SetDefaultProcessorVersionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('SetDefaultProcessorVersion', $request, $callOptions)->wait(); + } + + /** + * Trains a new processor version. + * Operation metadata is returned as + * [TrainProcessorVersionMetadata][google.cloud.documentai.v1.TrainProcessorVersionMetadata]. + * + * The async variant is + * {@see DocumentProcessorServiceClient::trainProcessorVersionAsync()} . + * + * @example samples/V1/DocumentProcessorServiceClient/train_processor_version.php + * + * @param TrainProcessorVersionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function trainProcessorVersion(TrainProcessorVersionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('TrainProcessorVersion', $request, $callOptions)->wait(); + } + + /** + * Undeploys the processor version. + * + * The async variant is + * {@see DocumentProcessorServiceClient::undeployProcessorVersionAsync()} . + * + * @example samples/V1/DocumentProcessorServiceClient/undeploy_processor_version.php + * + * @param UndeployProcessorVersionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function undeployProcessorVersion(UndeployProcessorVersionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UndeployProcessorVersion', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see DocumentProcessorServiceClient::getLocationAsync()} . + * + * @example samples/V1/DocumentProcessorServiceClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see DocumentProcessorServiceClient::listLocationsAsync()} + * . + * + * @example samples/V1/DocumentProcessorServiceClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/DocumentAi/v1/src/V1/gapic_metadata.json b/owl-bot-staging/DocumentAi/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..b6a28df90b49 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/src/V1/gapic_metadata.json @@ -0,0 +1,138 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.documentai.v1", + "libraryPackage": "Google\\Cloud\\DocumentAI\\V1", + "services": { + "DocumentProcessorService": { + "clients": { + "grpc": { + "libraryClient": "DocumentProcessorServiceGapicClient", + "rpcs": { + "BatchProcessDocuments": { + "methods": [ + "batchProcessDocuments" + ] + }, + "CreateProcessor": { + "methods": [ + "createProcessor" + ] + }, + "DeleteProcessor": { + "methods": [ + "deleteProcessor" + ] + }, + "DeleteProcessorVersion": { + "methods": [ + "deleteProcessorVersion" + ] + }, + "DeployProcessorVersion": { + "methods": [ + "deployProcessorVersion" + ] + }, + "DisableProcessor": { + "methods": [ + "disableProcessor" + ] + }, + "EnableProcessor": { + "methods": [ + "enableProcessor" + ] + }, + "EvaluateProcessorVersion": { + "methods": [ + "evaluateProcessorVersion" + ] + }, + "FetchProcessorTypes": { + "methods": [ + "fetchProcessorTypes" + ] + }, + "GetEvaluation": { + "methods": [ + "getEvaluation" + ] + }, + "GetProcessor": { + "methods": [ + "getProcessor" + ] + }, + "GetProcessorType": { + "methods": [ + "getProcessorType" + ] + }, + "GetProcessorVersion": { + "methods": [ + "getProcessorVersion" + ] + }, + "ListEvaluations": { + "methods": [ + "listEvaluations" + ] + }, + "ListProcessorTypes": { + "methods": [ + "listProcessorTypes" + ] + }, + "ListProcessorVersions": { + "methods": [ + "listProcessorVersions" + ] + }, + "ListProcessors": { + "methods": [ + "listProcessors" + ] + }, + "ProcessDocument": { + "methods": [ + "processDocument" + ] + }, + "ReviewDocument": { + "methods": [ + "reviewDocument" + ] + }, + "SetDefaultProcessorVersion": { + "methods": [ + "setDefaultProcessorVersion" + ] + }, + "TrainProcessorVersion": { + "methods": [ + "trainProcessorVersion" + ] + }, + "UndeployProcessorVersion": { + "methods": [ + "undeployProcessorVersion" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/DocumentAi/v1/src/V1/resources/document_processor_service_client_config.json b/owl-bot-staging/DocumentAi/v1/src/V1/resources/document_processor_service_client_config.json new file mode 100644 index 000000000000..d750f74493d7 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/src/V1/resources/document_processor_service_client_config.json @@ -0,0 +1,169 @@ +{ + "interfaces": { + "google.cloud.documentai.v1.DocumentProcessorService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE", + "RESOURCE_EXHAUSTED" + ], + "retry_policy_2_codes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 9.0, + "max_retry_delay_millis": 90000, + "initial_rpc_timeout_millis": 300000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 300000, + "total_timeout_millis": 300000 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.5, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 120000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 120000, + "total_timeout_millis": 120000 + } + }, + "methods": { + "BatchProcessDocuments": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "CreateProcessor": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteProcessor": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteProcessorVersion": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeployProcessorVersion": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DisableProcessor": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "EnableProcessor": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "EvaluateProcessorVersion": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "FetchProcessorTypes": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetEvaluation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetProcessor": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetProcessorType": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetProcessorVersion": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListEvaluations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListProcessorTypes": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListProcessorVersions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListProcessors": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ProcessDocument": { + "timeout_millis": 300000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ReviewDocument": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "SetDefaultProcessorVersion": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TrainProcessorVersion": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UndeployProcessorVersion": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/DocumentAi/v1/src/V1/resources/document_processor_service_descriptor_config.php b/owl-bot-staging/DocumentAi/v1/src/V1/resources/document_processor_service_descriptor_config.php new file mode 100644 index 000000000000..c0fd1eaee274 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/src/V1/resources/document_processor_service_descriptor_config.php @@ -0,0 +1,443 @@ + [ + 'google.cloud.documentai.v1.DocumentProcessorService' => [ + 'BatchProcessDocuments' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\DocumentAI\V1\BatchProcessResponse', + 'metadataReturnType' => '\Google\Cloud\DocumentAI\V1\BatchProcessMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteProcessor' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\DocumentAI\V1\DeleteProcessorMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteProcessorVersion' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\DocumentAI\V1\DeleteProcessorVersionMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeployProcessorVersion' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\DocumentAI\V1\DeployProcessorVersionResponse', + 'metadataReturnType' => '\Google\Cloud\DocumentAI\V1\DeployProcessorVersionMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DisableProcessor' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\DocumentAI\V1\DisableProcessorResponse', + 'metadataReturnType' => '\Google\Cloud\DocumentAI\V1\DisableProcessorMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'EnableProcessor' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\DocumentAI\V1\EnableProcessorResponse', + 'metadataReturnType' => '\Google\Cloud\DocumentAI\V1\EnableProcessorMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'EvaluateProcessorVersion' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\DocumentAI\V1\EvaluateProcessorVersionResponse', + 'metadataReturnType' => '\Google\Cloud\DocumentAI\V1\EvaluateProcessorVersionMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'processor_version', + 'fieldAccessors' => [ + 'getProcessorVersion', + ], + ], + ], + ], + 'ReviewDocument' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\DocumentAI\V1\ReviewDocumentResponse', + 'metadataReturnType' => '\Google\Cloud\DocumentAI\V1\ReviewDocumentOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'human_review_config', + 'fieldAccessors' => [ + 'getHumanReviewConfig', + ], + ], + ], + ], + 'SetDefaultProcessorVersion' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\DocumentAI\V1\SetDefaultProcessorVersionResponse', + 'metadataReturnType' => '\Google\Cloud\DocumentAI\V1\SetDefaultProcessorVersionMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'processor', + 'fieldAccessors' => [ + 'getProcessor', + ], + ], + ], + ], + 'TrainProcessorVersion' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\DocumentAI\V1\TrainProcessorVersionResponse', + 'metadataReturnType' => '\Google\Cloud\DocumentAI\V1\TrainProcessorVersionMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UndeployProcessorVersion' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\DocumentAI\V1\UndeployProcessorVersionResponse', + 'metadataReturnType' => '\Google\Cloud\DocumentAI\V1\UndeployProcessorVersionMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateProcessor' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DocumentAI\V1\Processor', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'FetchProcessorTypes' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DocumentAI\V1\FetchProcessorTypesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetEvaluation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DocumentAI\V1\Evaluation', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetProcessor' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DocumentAI\V1\Processor', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetProcessorType' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DocumentAI\V1\ProcessorType', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetProcessorVersion' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DocumentAI\V1\ProcessorVersion', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListEvaluations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getEvaluations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\DocumentAI\V1\ListEvaluationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListProcessorTypes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getProcessorTypes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\DocumentAI\V1\ListProcessorTypesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListProcessorVersions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getProcessorVersions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\DocumentAI\V1\ListProcessorVersionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListProcessors' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getProcessors', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\DocumentAI\V1\ListProcessorsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ProcessDocument' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DocumentAI\V1\ProcessResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'evaluation' => 'projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}', + 'humanReviewConfig' => 'projects/{project}/locations/{location}/processors/{processor}/humanReviewConfig', + 'location' => 'projects/{project}/locations/{location}', + 'processor' => 'projects/{project}/locations/{location}/processors/{processor}', + 'processorType' => 'projects/{project}/locations/{location}/processorTypes/{processor_type}', + 'processorVersion' => 'projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DocumentAi/v1/src/V1/resources/document_processor_service_rest_client_config.php b/owl-bot-staging/DocumentAi/v1/src/V1/resources/document_processor_service_rest_client_config.php new file mode 100644 index 000000000000..014fb56a6f21 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/src/V1/resources/document_processor_service_rest_client_config.php @@ -0,0 +1,389 @@ + [ + 'google.cloud.documentai.v1.DocumentProcessorService' => [ + 'BatchProcessDocuments' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/processors/*}:batchProcess', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}:batchProcess', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateProcessor' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/processors', + 'body' => 'processor', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteProcessor' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/processors/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteProcessorVersion' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeployProcessorVersion' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}:deploy', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DisableProcessor' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/processors/*}:disable', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'EnableProcessor' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/processors/*}:enable', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'EvaluateProcessorVersion' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{processor_version=projects/*/locations/*/processors/*/processorVersions/*}:evaluateProcessorVersion', + 'body' => '*', + 'placeholders' => [ + 'processor_version' => [ + 'getters' => [ + 'getProcessorVersion', + ], + ], + ], + ], + 'FetchProcessorTypes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:fetchProcessorTypes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetEvaluation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/processors/*/processorVersions/*/evaluations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetProcessor' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/processors/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetProcessorType' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/processorTypes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetProcessorVersion' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListEvaluations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/processors/*/processorVersions/*}/evaluations', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListProcessorTypes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/processorTypes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListProcessorVersions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/processors/*}/processorVersions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListProcessors' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/processors', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ProcessDocument' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/processors/*}:process', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}:process', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ReviewDocument' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{human_review_config=projects/*/locations/*/processors/*/humanReviewConfig}:reviewDocument', + 'body' => '*', + 'placeholders' => [ + 'human_review_config' => [ + 'getters' => [ + 'getHumanReviewConfig', + ], + ], + ], + ], + 'SetDefaultProcessorVersion' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{processor=projects/*/locations/*/processors/*}:setDefaultProcessorVersion', + 'body' => '*', + 'placeholders' => [ + 'processor' => [ + 'getters' => [ + 'getProcessor', + ], + ], + ], + ], + 'TrainProcessorVersion' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/processors/*}/processorVersions:train', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UndeployProcessorVersion' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}:undeploy', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/uiv1beta3/{name=projects/*/locations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/uiv1beta3/{name=projects/*}/locations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/uiv1beta3/{name=projects/*/locations/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/uiv1beta3/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/uiv1beta3/{name=projects/*/locations/*/operations}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/DocumentAi/v1/tests/Unit/V1/Client/DocumentProcessorServiceClientTest.php b/owl-bot-staging/DocumentAi/v1/tests/Unit/V1/Client/DocumentProcessorServiceClientTest.php new file mode 100644 index 000000000000..2eb82c84c2b4 --- /dev/null +++ b/owl-bot-staging/DocumentAi/v1/tests/Unit/V1/Client/DocumentProcessorServiceClientTest.php @@ -0,0 +1,2437 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return DocumentProcessorServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DocumentProcessorServiceClient($options); + } + + /** @test */ + public function batchProcessDocumentsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchProcessDocumentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new BatchProcessResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchProcessDocumentsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $request = (new BatchProcessRequest()) + ->setName($name); + $response = $gapicClient->batchProcessDocuments($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/BatchProcessDocuments', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchProcessDocumentsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function batchProcessDocumentsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchProcessDocumentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new BatchProcessRequest()) + ->setName($name); + $response = $gapicClient->batchProcessDocuments($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchProcessDocumentsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createProcessorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $type = 'type3575610'; + $displayName = 'displayName1615086568'; + $defaultProcessorVersion = 'defaultProcessorVersion1185902509'; + $processEndpoint = 'processEndpoint-178717339'; + $kmsKeyName = 'kmsKeyName2094986649'; + $satisfiesPzs = false; + $satisfiesPzi = false; + $expectedResponse = new Processor(); + $expectedResponse->setName($name); + $expectedResponse->setType($type); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDefaultProcessorVersion($defaultProcessorVersion); + $expectedResponse->setProcessEndpoint($processEndpoint); + $expectedResponse->setKmsKeyName($kmsKeyName); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $processor = new Processor(); + $request = (new CreateProcessorRequest()) + ->setParent($formattedParent) + ->setProcessor($processor); + $response = $gapicClient->createProcessor($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/CreateProcessor', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getProcessor(); + $this->assertProtobufEquals($processor, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createProcessorExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $processor = new Processor(); + $request = (new CreateProcessorRequest()) + ->setParent($formattedParent) + ->setProcessor($processor); + try { + $gapicClient->createProcessor($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteProcessorTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteProcessorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteProcessorTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); + $request = (new DeleteProcessorRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteProcessor($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/DeleteProcessor', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteProcessorTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteProcessorExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteProcessorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); + $request = (new DeleteProcessorRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteProcessor($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteProcessorTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteProcessorVersionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteProcessorVersionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteProcessorVersionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->processorVersionName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]'); + $request = (new DeleteProcessorVersionRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteProcessorVersion($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/DeleteProcessorVersion', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteProcessorVersionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteProcessorVersionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteProcessorVersionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->processorVersionName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]'); + $request = (new DeleteProcessorVersionRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteProcessorVersion($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteProcessorVersionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deployProcessorVersionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deployProcessorVersionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new DeployProcessorVersionResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deployProcessorVersionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->processorVersionName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]'); + $request = (new DeployProcessorVersionRequest()) + ->setName($formattedName); + $response = $gapicClient->deployProcessorVersion($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/DeployProcessorVersion', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deployProcessorVersionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deployProcessorVersionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deployProcessorVersionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->processorVersionName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]'); + $request = (new DeployProcessorVersionRequest()) + ->setName($formattedName); + $response = $gapicClient->deployProcessorVersion($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deployProcessorVersionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function disableProcessorTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/disableProcessorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new DisableProcessorResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/disableProcessorTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); + $request = (new DisableProcessorRequest()) + ->setName($formattedName); + $response = $gapicClient->disableProcessor($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/DisableProcessor', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/disableProcessorTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function disableProcessorExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/disableProcessorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); + $request = (new DisableProcessorRequest()) + ->setName($formattedName); + $response = $gapicClient->disableProcessor($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/disableProcessorTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function enableProcessorTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/enableProcessorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new EnableProcessorResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/enableProcessorTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); + $request = (new EnableProcessorRequest()) + ->setName($formattedName); + $response = $gapicClient->enableProcessor($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/EnableProcessor', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/enableProcessorTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function enableProcessorExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/enableProcessorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); + $request = (new EnableProcessorRequest()) + ->setName($formattedName); + $response = $gapicClient->enableProcessor($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/enableProcessorTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function evaluateProcessorVersionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/evaluateProcessorVersionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $evaluation = 'evaluation858523452'; + $expectedResponse = new EvaluateProcessorVersionResponse(); + $expectedResponse->setEvaluation($evaluation); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/evaluateProcessorVersionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedProcessorVersion = $gapicClient->processorVersionName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]'); + $request = (new EvaluateProcessorVersionRequest()) + ->setProcessorVersion($formattedProcessorVersion); + $response = $gapicClient->evaluateProcessorVersion($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/EvaluateProcessorVersion', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getProcessorVersion(); + $this->assertProtobufEquals($formattedProcessorVersion, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/evaluateProcessorVersionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function evaluateProcessorVersionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/evaluateProcessorVersionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedProcessorVersion = $gapicClient->processorVersionName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]'); + $request = (new EvaluateProcessorVersionRequest()) + ->setProcessorVersion($formattedProcessorVersion); + $response = $gapicClient->evaluateProcessorVersion($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/evaluateProcessorVersionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function fetchProcessorTypesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new FetchProcessorTypesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new FetchProcessorTypesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->fetchProcessorTypes($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/FetchProcessorTypes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function fetchProcessorTypesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new FetchProcessorTypesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->fetchProcessorTypes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEvaluationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $kmsKeyName = 'kmsKeyName2094986649'; + $kmsKeyVersionName = 'kmsKeyVersionName-1734350176'; + $expectedResponse = new Evaluation(); + $expectedResponse->setName($name2); + $expectedResponse->setKmsKeyName($kmsKeyName); + $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->evaluationName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]', '[EVALUATION]'); + $request = (new GetEvaluationRequest()) + ->setName($formattedName); + $response = $gapicClient->getEvaluation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/GetEvaluation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEvaluationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->evaluationName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]', '[EVALUATION]'); + $request = (new GetEvaluationRequest()) + ->setName($formattedName); + try { + $gapicClient->getEvaluation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getProcessorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $type = 'type3575610'; + $displayName = 'displayName1615086568'; + $defaultProcessorVersion = 'defaultProcessorVersion1185902509'; + $processEndpoint = 'processEndpoint-178717339'; + $kmsKeyName = 'kmsKeyName2094986649'; + $satisfiesPzs = false; + $satisfiesPzi = false; + $expectedResponse = new Processor(); + $expectedResponse->setName($name2); + $expectedResponse->setType($type); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDefaultProcessorVersion($defaultProcessorVersion); + $expectedResponse->setProcessEndpoint($processEndpoint); + $expectedResponse->setKmsKeyName($kmsKeyName); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); + $request = (new GetProcessorRequest()) + ->setName($formattedName); + $response = $gapicClient->getProcessor($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/GetProcessor', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getProcessorExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); + $request = (new GetProcessorRequest()) + ->setName($formattedName); + try { + $gapicClient->getProcessor($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getProcessorTypeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $type = 'type3575610'; + $category = 'category50511102'; + $allowCreation = false; + $expectedResponse = new ProcessorType(); + $expectedResponse->setName($name2); + $expectedResponse->setType($type); + $expectedResponse->setCategory($category); + $expectedResponse->setAllowCreation($allowCreation); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->processorTypeName('[PROJECT]', '[LOCATION]', '[PROCESSOR_TYPE]'); + $request = (new GetProcessorTypeRequest()) + ->setName($formattedName); + $response = $gapicClient->getProcessorType($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/GetProcessorType', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getProcessorTypeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->processorTypeName('[PROJECT]', '[LOCATION]', '[PROCESSOR_TYPE]'); + $request = (new GetProcessorTypeRequest()) + ->setName($formattedName); + try { + $gapicClient->getProcessorType($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getProcessorVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $kmsKeyName = 'kmsKeyName2094986649'; + $kmsKeyVersionName = 'kmsKeyVersionName-1734350176'; + $googleManaged = false; + $satisfiesPzs = false; + $satisfiesPzi = false; + $expectedResponse = new ProcessorVersion(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setKmsKeyName($kmsKeyName); + $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName); + $expectedResponse->setGoogleManaged($googleManaged); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->processorVersionName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]'); + $request = (new GetProcessorVersionRequest()) + ->setName($formattedName); + $response = $gapicClient->getProcessorVersion($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/GetProcessorVersion', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getProcessorVersionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->processorVersionName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]'); + $request = (new GetProcessorVersionRequest()) + ->setName($formattedName); + try { + $gapicClient->getProcessorVersion($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEvaluationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $evaluationsElement = new Evaluation(); + $evaluations = [ + $evaluationsElement, + ]; + $expectedResponse = new ListEvaluationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setEvaluations($evaluations); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->processorVersionName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]'); + $request = (new ListEvaluationsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listEvaluations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEvaluations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/ListEvaluations', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEvaluationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->processorVersionName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]'); + $request = (new ListEvaluationsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listEvaluations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProcessorTypesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $processorTypesElement = new ProcessorType(); + $processorTypes = [ + $processorTypesElement, + ]; + $expectedResponse = new ListProcessorTypesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setProcessorTypes($processorTypes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListProcessorTypesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listProcessorTypes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getProcessorTypes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/ListProcessorTypes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProcessorTypesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListProcessorTypesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listProcessorTypes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProcessorVersionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $processorVersionsElement = new ProcessorVersion(); + $processorVersions = [ + $processorVersionsElement, + ]; + $expectedResponse = new ListProcessorVersionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setProcessorVersions($processorVersions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); + $request = (new ListProcessorVersionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listProcessorVersions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getProcessorVersions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/ListProcessorVersions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProcessorVersionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); + $request = (new ListProcessorVersionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listProcessorVersions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProcessorsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $processorsElement = new Processor(); + $processors = [ + $processorsElement, + ]; + $expectedResponse = new ListProcessorsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setProcessors($processors); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListProcessorsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listProcessors($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getProcessors()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/ListProcessors', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProcessorsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListProcessorsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listProcessors($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function processDocumentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ProcessResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $request = (new ProcessRequest()) + ->setName($name); + $response = $gapicClient->processDocument($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/ProcessDocument', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function processDocumentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new ProcessRequest()) + ->setName($name); + try { + $gapicClient->processDocument($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function reviewDocumentTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/reviewDocumentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $gcsDestination = 'gcsDestination714819302'; + $rejectionReason = 'rejectionReason2141394746'; + $expectedResponse = new ReviewDocumentResponse(); + $expectedResponse->setGcsDestination($gcsDestination); + $expectedResponse->setRejectionReason($rejectionReason); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/reviewDocumentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedHumanReviewConfig = $gapicClient->humanReviewConfigName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); + $request = (new ReviewDocumentRequest()) + ->setHumanReviewConfig($formattedHumanReviewConfig); + $response = $gapicClient->reviewDocument($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/ReviewDocument', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getHumanReviewConfig(); + $this->assertProtobufEquals($formattedHumanReviewConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/reviewDocumentTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function reviewDocumentExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/reviewDocumentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedHumanReviewConfig = $gapicClient->humanReviewConfigName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); + $request = (new ReviewDocumentRequest()) + ->setHumanReviewConfig($formattedHumanReviewConfig); + $response = $gapicClient->reviewDocument($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/reviewDocumentTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function setDefaultProcessorVersionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/setDefaultProcessorVersionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new SetDefaultProcessorVersionResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/setDefaultProcessorVersionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedProcessor = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); + $formattedDefaultProcessorVersion = $gapicClient->processorVersionName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]'); + $request = (new SetDefaultProcessorVersionRequest()) + ->setProcessor($formattedProcessor) + ->setDefaultProcessorVersion($formattedDefaultProcessorVersion); + $response = $gapicClient->setDefaultProcessorVersion($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/SetDefaultProcessorVersion', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getProcessor(); + $this->assertProtobufEquals($formattedProcessor, $actualValue); + $actualValue = $actualApiRequestObject->getDefaultProcessorVersion(); + $this->assertProtobufEquals($formattedDefaultProcessorVersion, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/setDefaultProcessorVersionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function setDefaultProcessorVersionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/setDefaultProcessorVersionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedProcessor = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); + $formattedDefaultProcessorVersion = $gapicClient->processorVersionName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]'); + $request = (new SetDefaultProcessorVersionRequest()) + ->setProcessor($formattedProcessor) + ->setDefaultProcessorVersion($formattedDefaultProcessorVersion); + $response = $gapicClient->setDefaultProcessorVersion($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/setDefaultProcessorVersionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function trainProcessorVersionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/trainProcessorVersionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $processorVersion2 = 'processorVersion2-1092580578'; + $expectedResponse = new TrainProcessorVersionResponse(); + $expectedResponse->setProcessorVersion($processorVersion2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/trainProcessorVersionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); + $processorVersion = new ProcessorVersion(); + $request = (new TrainProcessorVersionRequest()) + ->setParent($formattedParent) + ->setProcessorVersion($processorVersion); + $response = $gapicClient->trainProcessorVersion($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/TrainProcessorVersion', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getProcessorVersion(); + $this->assertProtobufEquals($processorVersion, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/trainProcessorVersionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function trainProcessorVersionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/trainProcessorVersionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); + $processorVersion = new ProcessorVersion(); + $request = (new TrainProcessorVersionRequest()) + ->setParent($formattedParent) + ->setProcessorVersion($processorVersion); + $response = $gapicClient->trainProcessorVersion($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/trainProcessorVersionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function undeployProcessorVersionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/undeployProcessorVersionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new UndeployProcessorVersionResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/undeployProcessorVersionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->processorVersionName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]'); + $request = (new UndeployProcessorVersionRequest()) + ->setName($formattedName); + $response = $gapicClient->undeployProcessorVersion($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/UndeployProcessorVersion', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/undeployProcessorVersionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function undeployProcessorVersionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/undeployProcessorVersionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->processorVersionName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]'); + $request = (new UndeployProcessorVersionRequest()) + ->setName($formattedName); + $response = $gapicClient->undeployProcessorVersion($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/undeployProcessorVersionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchProcessDocumentsAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchProcessDocumentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new BatchProcessResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchProcessDocumentsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $request = (new BatchProcessRequest()) + ->setName($name); + $response = $gapicClient->batchProcessDocumentsAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/BatchProcessDocuments', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchProcessDocumentsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} From 6ca7bfe54b7ecf77c8f911bdc728f33b2a0fc9fe Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 1 Apr 2026 21:10:44 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- DocumentAi/metadata/V1/Document.php | 3 +- DocumentAi/src/V1/Document.php | 54 +- .../src}/V1/Document/Annotations.php | 0 .../src}/V1/Document/BlobAsset.php | 0 .../src/V1/Document/ChunkedDocument/Chunk.php | 34 + .../ChunkedDocument/Chunk/ChunkField.php | 0 .../ChunkedDocument/Chunk/ImageChunkField.php | 0 .../ChunkedDocument/Chunk/TableChunkField.php | 0 .../DocumentLayout/DocumentLayoutBlock.php | 33 + .../DocumentLayoutBlock/LayoutImageBlock.php | 0 .../DocumentLayoutBlock/LayoutTableBlock.php | 44 + .../DocumentLayoutBlock/LayoutTextBlock.php | 44 + DocumentAi/src/V1/Document/Entity.php | 44 +- .../V1/Document/Entity/NormalizedValue.php | 8 + DocumentAi/src/V1/Document/Page.php | 8 +- DocumentAi/src/V1/Document/Page/FormField.php | 8 +- DocumentAi/src/V1/Document/Page/Layout.php | 24 +- .../src/V1/Document/Page/VisualElement.php | 4 +- .../src/V1/Document/Revision/HumanReview.php | 8 +- .../Google/Cloud/Documentai/V1/Barcode.php | 24 - .../Google/Cloud/Documentai/V1/Document.php | 35 - .../Google/Cloud/Documentai/V1/DocumentIo.php | 25 - .../V1/DocumentProcessorService.php | 40 - .../Cloud/Documentai/V1/DocumentSchema.php | 24 - .../Google/Cloud/Documentai/V1/Evaluation.php | 27 - .../Google/Cloud/Documentai/V1/Geometry.php | 24 - .../Cloud/Documentai/V1/OperationMetadata.php | 25 - .../Google/Cloud/Documentai/V1/Processor.php | 29 - .../Cloud/Documentai/V1/ProcessorType.php | 26 - .../Google/Cloud/DocumentAI/V1/Barcode.php | 255 -- .../V1/BatchDocumentsInputConfig.php | 108 - .../DocumentAI/V1/BatchProcessMetadata.php | 228 -- .../IndividualProcessStatus.php | 205 -- .../V1/BatchProcessMetadata/State.php | 89 - .../DocumentAI/V1/BatchProcessRequest.php | 342 --- .../DocumentAI/V1/BatchProcessResponse.php | 34 - .../Cloud/DocumentAI/V1/BoundingPoly.php | 101 - .../DocumentAI/V1/CommonOperationMetadata.php | 223 -- .../V1/CommonOperationMetadata/State.php | 82 - .../DocumentAI/V1/CreateProcessorRequest.php | 161 -- .../DocumentAI/V1/DeleteProcessorMetadata.php | 79 - .../DocumentAI/V1/DeleteProcessorRequest.php | 83 - .../V1/DeleteProcessorVersionMetadata.php | 79 - .../V1/DeleteProcessorVersionRequest.php | 83 - .../V1/DeployProcessorVersionMetadata.php | 79 - .../V1/DeployProcessorVersionRequest.php | 83 - .../V1/DeployProcessorVersionResponse.php | 35 - .../V1/DisableProcessorMetadata.php | 79 - .../DocumentAI/V1/DisableProcessorRequest.php | 69 - .../V1/DisableProcessorResponse.php | 35 - .../Google/Cloud/DocumentAI/V1/Document.php | 835 ------ .../V1/Document/ChunkedDocument.php | 67 - .../V1/Document/ChunkedDocument/Chunk.php | 281 -- .../ChunkedDocument/Chunk/ChunkPageFooter.php | 111 - .../ChunkedDocument/Chunk/ChunkPageHeader.php | 111 - .../ChunkedDocument/Chunk/ChunkPageSpan.php | 101 - .../DocumentAI/V1/Document/DocumentLayout.php | 68 - .../DocumentLayout/DocumentLayoutBlock.php | 297 -- .../DocumentLayoutBlock/LayoutListBlock.php | 105 - .../DocumentLayoutBlock/LayoutListEntry.php | 71 - .../DocumentLayoutBlock/LayoutPageSpan.php | 101 - .../DocumentLayoutBlock/LayoutTableBlock.php | 179 -- .../DocumentLayoutBlock/LayoutTableCell.php | 139 - .../DocumentLayoutBlock/LayoutTableRow.php | 67 - .../DocumentLayoutBlock/LayoutTextBlock.php | 191 -- .../V1/Document/EntitiesRevision.php | 145 - .../Cloud/DocumentAI/V1/Document/Entity.php | 523 ---- .../DocumentAI/V1/Document/Entity/Method.php | 63 - .../V1/Document/Entity/NormalizedValue.php | 390 --- .../DocumentAI/V1/Document/EntityRelation.php | 136 - .../V1/Document/EntityValidationOutput.php | 105 - .../ValidationResult.php | 173 -- .../ValidationResult/ValidationResultType.php | 75 - .../Cloud/DocumentAI/V1/Document/Page.php | 720 ----- .../DocumentAI/V1/Document/Page/Block.php | 171 -- .../V1/Document/Page/DetectedBarcode.php | 129 - .../V1/Document/Page/DetectedLanguage.php | 109 - .../DocumentAI/V1/Document/Page/Dimension.php | 135 - .../DocumentAI/V1/Document/Page/FormField.php | 379 --- .../DocumentAI/V1/Document/Page/Image.php | 177 -- .../V1/Document/Page/ImageQualityScores.php | 101 - .../ImageQualityScores/DetectedDefect.php | 137 - .../DocumentAI/V1/Document/Page/Layout.php | 217 -- .../V1/Document/Page/Layout/Orientation.php | 78 - .../DocumentAI/V1/Document/Page/Line.php | 171 -- .../DocumentAI/V1/Document/Page/Matrix.php | 182 -- .../DocumentAI/V1/Document/Page/Paragraph.php | 170 -- .../DocumentAI/V1/Document/Page/Symbol.php | 115 - .../DocumentAI/V1/Document/Page/Table.php | 238 -- .../V1/Document/Page/Table/TableCell.php | 183 -- .../V1/Document/Page/Table/TableRow.php | 67 - .../DocumentAI/V1/Document/Page/Token.php | 262 -- .../V1/Document/Page/Token/DetectedBreak.php | 68 - .../Page/Token/DetectedBreak/Type.php | 68 - .../V1/Document/Page/Token/StyleInfo.php | 583 ---- .../V1/Document/Page/VisualElement.php | 154 -- .../DocumentAI/V1/Document/PageAnchor.php | 70 - .../V1/Document/PageAnchor/PageRef.php | 264 -- .../PageAnchor/PageRef/LayoutType.php | 109 - .../DocumentAI/V1/Document/Provenance.php | 188 -- .../V1/Document/Provenance/OperationType.php | 102 - .../V1/Document/Provenance/PBParent.php | 147 - .../Cloud/DocumentAI/V1/Document/Revision.php | 337 --- .../V1/Document/Revision/HumanReview.php | 105 - .../DocumentAI/V1/Document/ShardInfo.php | 145 - .../Cloud/DocumentAI/V1/Document/Style.php | 374 --- .../DocumentAI/V1/Document/Style/FontSize.php | 105 - .../DocumentAI/V1/Document/TextAnchor.php | 114 - .../V1/Document/TextAnchor/TextSegment.php | 121 - .../DocumentAI/V1/Document/TextChange.php | 174 -- .../DocumentAI/V1/DocumentOutputConfig.php | 76 - .../DocumentOutputConfig/GcsOutputConfig.php | 163 -- .../GcsOutputConfig/ShardingConfig.php | 101 - .../Cloud/DocumentAI/V1/DocumentSchema.php | 179 -- .../V1/DocumentSchema/EntityType.php | 273 -- .../DocumentSchema/EntityType/EnumValues.php | 67 - .../V1/DocumentSchema/EntityType/Property.php | 215 -- .../EntityType/Property/Method.php | 63 - .../EntityType/Property/OccurrenceType.php | 85 - .../DocumentAI/V1/DocumentSchema/Metadata.php | 189 -- .../DocumentAI/V1/EnableProcessorMetadata.php | 79 - .../DocumentAI/V1/EnableProcessorRequest.php | 69 - .../DocumentAI/V1/EnableProcessorResponse.php | 35 - .../V1/EvaluateProcessorVersionMetadata.php | 79 - .../V1/EvaluateProcessorVersionRequest.php | 146 - .../V1/EvaluateProcessorVersionResponse.php | 69 - .../Google/Cloud/DocumentAI/V1/Evaluation.php | 309 --- .../V1/Evaluation/ConfidenceLevelMetrics.php | 111 - .../DocumentAI/V1/Evaluation/Counters.php | 177 -- .../DocumentAI/V1/Evaluation/Metrics.php | 407 --- .../V1/Evaluation/MultiConfidenceMetrics.php | 287 -- .../MultiConfidenceMetrics/MetricsType.php | 60 - .../DocumentAI/V1/EvaluationReference.php | 189 -- .../V1/FetchProcessorTypesRequest.php | 89 - .../V1/FetchProcessorTypesResponse.php | 69 - .../Cloud/DocumentAI/V1/GcsDocument.php | 101 - .../Cloud/DocumentAI/V1/GcsDocuments.php | 67 - .../Google/Cloud/DocumentAI/V1/GcsPrefix.php | 67 - .../DocumentAI/V1/GetEvaluationRequest.php | 91 - .../DocumentAI/V1/GetProcessorRequest.php | 83 - .../DocumentAI/V1/GetProcessorTypeRequest.php | 83 - .../V1/GetProcessorVersionRequest.php | 83 - .../Cloud/DocumentAI/V1/HumanReviewStatus.php | 155 -- .../DocumentAI/V1/HumanReviewStatus/State.php | 79 - .../DocumentAI/V1/ListEvaluationsRequest.php | 177 -- .../DocumentAI/V1/ListEvaluationsResponse.php | 105 - .../V1/ListProcessorTypesRequest.php | 165 -- .../V1/ListProcessorTypesResponse.php | 103 - .../V1/ListProcessorVersionsRequest.php | 171 -- .../V1/ListProcessorVersionsResponse.php | 103 - .../DocumentAI/V1/ListProcessorsRequest.php | 166 -- .../DocumentAI/V1/ListProcessorsResponse.php | 103 - .../Cloud/DocumentAI/V1/NormalizedVertex.php | 103 - .../Google/Cloud/DocumentAI/V1/OcrConfig.php | 380 --- .../Cloud/DocumentAI/V1/OcrConfig/Hints.php | 87 - .../V1/OcrConfig/PremiumFeatures.php | 139 - .../Cloud/DocumentAI/V1/ProcessOptions.php | 300 -- .../ProcessOptions/IndividualPageSelector.php | 67 - .../V1/ProcessOptions/LayoutConfig.php | 217 -- .../LayoutConfig/ChunkingConfig.php | 105 - .../Cloud/DocumentAI/V1/ProcessRequest.php | 457 ---- .../Cloud/DocumentAI/V1/ProcessResponse.php | 127 - .../Google/Cloud/DocumentAI/V1/Processor.php | 438 --- .../Cloud/DocumentAI/V1/Processor/State.php | 104 - .../Cloud/DocumentAI/V1/ProcessorType.php | 280 -- .../V1/ProcessorType/LocationInfo.php | 71 - .../Cloud/DocumentAI/V1/ProcessorVersion.php | 582 ---- .../V1/ProcessorVersion/DeprecationInfo.php | 111 - .../V1/ProcessorVersion/GenAiModelInfo.php | 108 - .../GenAiModelInfo/CustomGenAiModelInfo.php | 103 - .../CustomGenAiModelInfo/CustomModelType.php | 61 - .../FoundationGenAiModelInfo.php | 105 - .../V1/ProcessorVersion/ModelType.php | 61 - .../DocumentAI/V1/ProcessorVersion/State.php | 103 - .../DocumentAI/V1/ProcessorVersionAlias.php | 101 - .../Cloud/DocumentAI/V1/RawDocument.php | 155 -- .../V1/ReviewDocumentOperationMetadata.php | 113 - .../DocumentAI/V1/ReviewDocumentRequest.php | 247 -- .../V1/ReviewDocumentRequest/Priority.php | 59 - .../DocumentAI/V1/ReviewDocumentResponse.php | 141 - .../V1/ReviewDocumentResponse/State.php | 61 - .../V1/SetDefaultProcessorVersionMetadata.php | 79 - .../V1/SetDefaultProcessorVersionRequest.php | 123 - .../V1/SetDefaultProcessorVersionResponse.php | 35 - .../V1/TrainProcessorVersionMetadata.php | 165 -- .../DatasetValidation.php | 186 -- .../V1/TrainProcessorVersionRequest.php | 348 --- .../CustomDocumentExtractionOptions.php | 68 - .../TrainingMethod.php | 56 - .../FoundationModelTuningOptions.php | 113 - .../InputData.php | 122 - .../V1/TrainProcessorVersionResponse.php | 68 - .../V1/UndeployProcessorVersionMetadata.php | 79 - .../V1/UndeployProcessorVersionRequest.php | 83 - .../V1/UndeployProcessorVersionResponse.php | 35 - .../src/Google/Cloud/DocumentAI/V1/Vertex.php | 102 - .../batch_process_documents.php | 88 - .../create_processor.php | 80 - .../delete_processor.php | 85 - .../delete_processor_version.php | 86 - .../deploy_processor_version.php | 88 - .../disable_processor.php | 87 - .../enable_processor.php | 87 - .../evaluate_processor_version.php | 92 - .../fetch_processor_types.php | 74 - .../get_evaluation.php | 79 - .../get_location.php | 57 - .../get_processor.php | 75 - .../get_processor_type.php | 75 - .../get_processor_version.php | 76 - .../list_evaluations.php | 84 - .../list_locations.php | 62 - .../list_processor_types.php | 77 - .../list_processor_versions.php | 82 - .../list_processors.php | 77 - .../process_document.php | 79 - .../review_document.php | 90 - .../set_default_processor_version.php | 107 - .../train_processor_version.php | 94 - .../undeploy_processor_version.php | 88 - .../Client/DocumentProcessorServiceClient.php | 1119 -------- .../DocumentAi/v1/src/V1/gapic_metadata.json | 138 - ...ument_processor_service_client_config.json | 169 -- ...nt_processor_service_descriptor_config.php | 443 --- ...t_processor_service_rest_client_config.php | 389 --- .../DocumentProcessorServiceClientTest.php | 2437 ----------------- 226 files changed, 265 insertions(+), 32965 deletions(-) rename {owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI => DocumentAi/src}/V1/Document/Annotations.php (100%) rename {owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI => DocumentAi/src}/V1/Document/BlobAsset.php (100%) rename {owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI => DocumentAi/src}/V1/Document/ChunkedDocument/Chunk/ChunkField.php (100%) rename {owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI => DocumentAi/src}/V1/Document/ChunkedDocument/Chunk/ImageChunkField.php (100%) rename {owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI => DocumentAi/src}/V1/Document/ChunkedDocument/Chunk/TableChunkField.php (100%) rename {owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI => DocumentAi/src}/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutImageBlock.php (100%) delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Barcode.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Document.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/DocumentIo.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/DocumentProcessorService.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/DocumentSchema.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Evaluation.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Geometry.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Processor.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/ProcessorType.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Barcode.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchDocumentsInputConfig.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessMetadata.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessMetadata/IndividualProcessStatus.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessMetadata/State.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessRequest.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessResponse.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BoundingPoly.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/CommonOperationMetadata.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/CommonOperationMetadata/State.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/CreateProcessorRequest.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorMetadata.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorRequest.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorVersionMetadata.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorVersionRequest.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeployProcessorVersionMetadata.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeployProcessorVersionRequest.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeployProcessorVersionResponse.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DisableProcessorMetadata.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DisableProcessorRequest.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DisableProcessorResponse.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ChunkPageFooter.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ChunkPageHeader.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ChunkPageSpan.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutListBlock.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutListEntry.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutPageSpan.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTableBlock.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTableCell.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTableRow.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTextBlock.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntitiesRevision.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Entity.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Entity/Method.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Entity/NormalizedValue.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityRelation.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityValidationOutput.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityValidationOutput/ValidationResult.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityValidationOutput/ValidationResult/ValidationResultType.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Block.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/DetectedBarcode.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/DetectedLanguage.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Dimension.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/FormField.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Image.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/ImageQualityScores.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/ImageQualityScores/DetectedDefect.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Layout.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Layout/Orientation.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Line.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Matrix.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Paragraph.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Symbol.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Table.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Table/TableCell.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Table/TableRow.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token/DetectedBreak.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token/DetectedBreak/Type.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token/StyleInfo.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/VisualElement.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/PageAnchor.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/PageAnchor/PageRef.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/PageAnchor/PageRef/LayoutType.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Provenance.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Provenance/OperationType.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Provenance/PBParent.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Revision.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Revision/HumanReview.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ShardInfo.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Style.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Style/FontSize.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/TextAnchor.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/TextAnchor/TextSegment.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/TextChange.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentOutputConfig.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentOutputConfig/GcsOutputConfig.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentOutputConfig/GcsOutputConfig/ShardingConfig.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/EnumValues.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/Property.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/Property/Method.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/Property/OccurrenceType.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/Metadata.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EnableProcessorMetadata.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EnableProcessorRequest.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EnableProcessorResponse.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluateProcessorVersionMetadata.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluateProcessorVersionRequest.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluateProcessorVersionResponse.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/ConfidenceLevelMetrics.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/Counters.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/Metrics.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/MultiConfidenceMetrics.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/MultiConfidenceMetrics/MetricsType.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluationReference.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/FetchProcessorTypesRequest.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/FetchProcessorTypesResponse.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GcsDocument.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GcsDocuments.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GcsPrefix.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetEvaluationRequest.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetProcessorRequest.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetProcessorTypeRequest.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetProcessorVersionRequest.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/HumanReviewStatus.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/HumanReviewStatus/State.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListEvaluationsRequest.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListEvaluationsResponse.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorTypesRequest.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorTypesResponse.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorVersionsRequest.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorVersionsResponse.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorsRequest.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorsResponse.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/NormalizedVertex.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/OcrConfig.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/OcrConfig/Hints.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/OcrConfig/PremiumFeatures.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions/IndividualPageSelector.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions/LayoutConfig.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions/LayoutConfig/ChunkingConfig.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessRequest.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessResponse.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Processor.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Processor/State.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorType.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorType/LocationInfo.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/DeprecationInfo.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo/CustomGenAiModelInfo.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo/CustomGenAiModelInfo/CustomModelType.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo/FoundationGenAiModelInfo.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/ModelType.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/State.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersionAlias.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/RawDocument.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentOperationMetadata.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentRequest.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentRequest/Priority.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentResponse.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentResponse/State.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/SetDefaultProcessorVersionMetadata.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/SetDefaultProcessorVersionRequest.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/SetDefaultProcessorVersionResponse.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionMetadata.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionMetadata/DatasetValidation.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/CustomDocumentExtractionOptions.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/CustomDocumentExtractionOptions/TrainingMethod.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/FoundationModelTuningOptions.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/InputData.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionResponse.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/UndeployProcessorVersionMetadata.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/UndeployProcessorVersionRequest.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/UndeployProcessorVersionResponse.php delete mode 100644 owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Vertex.php delete mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/batch_process_documents.php delete mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/create_processor.php delete mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/delete_processor.php delete mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/delete_processor_version.php delete mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/deploy_processor_version.php delete mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/disable_processor.php delete mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/enable_processor.php delete mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/evaluate_processor_version.php delete mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/fetch_processor_types.php delete mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_evaluation.php delete mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_location.php delete mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_processor.php delete mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_processor_type.php delete mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_processor_version.php delete mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_evaluations.php delete mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_locations.php delete mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_processor_types.php delete mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_processor_versions.php delete mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_processors.php delete mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/process_document.php delete mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/review_document.php delete mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/set_default_processor_version.php delete mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/train_processor_version.php delete mode 100644 owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/undeploy_processor_version.php delete mode 100644 owl-bot-staging/DocumentAi/v1/src/V1/Client/DocumentProcessorServiceClient.php delete mode 100644 owl-bot-staging/DocumentAi/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/DocumentAi/v1/src/V1/resources/document_processor_service_client_config.json delete mode 100644 owl-bot-staging/DocumentAi/v1/src/V1/resources/document_processor_service_descriptor_config.php delete mode 100644 owl-bot-staging/DocumentAi/v1/src/V1/resources/document_processor_service_rest_client_config.php delete mode 100644 owl-bot-staging/DocumentAi/v1/tests/Unit/V1/Client/DocumentProcessorServiceClientTest.php diff --git a/DocumentAi/metadata/V1/Document.php b/DocumentAi/metadata/V1/Document.php index 7abee157c3e4..9ba73c628c19 100644 --- a/DocumentAi/metadata/V1/Document.php +++ b/DocumentAi/metadata/V1/Document.php @@ -15,6 +15,7 @@ public static function initOnce() { return; } \GPBMetadata\Google\Api\FieldBehavior::initOnce(); + \GPBMetadata\Google\Api\Resource::initOnce(); \GPBMetadata\Google\Cloud\Documentai\V1\Barcode::initOnce(); \GPBMetadata\Google\Cloud\Documentai\V1\Geometry::initOnce(); \GPBMetadata\Google\Protobuf\Timestamp::initOnce(); @@ -25,7 +26,7 @@ public static function initOnce() { \GPBMetadata\Google\Type\Money::initOnce(); \GPBMetadata\Google\Type\PostalAddress::initOnce(); $pool->internalAddGeneratedFile( - "\x0A\xD7f\x0A)google/cloud/documentai/v1/document.proto\x12\x1Agoogle.cloud.documentai.v1\x1A(google/cloud/documentai/v1/barcode.proto\x1A)google/cloud/documentai/v1/geometry.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x17google/rpc/status.proto\x1A\x17google/type/color.proto\x1A\x16google/type/date.proto\x1A\x1Agoogle/type/datetime.proto\x1A\x17google/type/money.proto\x1A google/type/postal_address.proto\"\xA0b\x0A\x08Document\x12\x12\x0A\x03uri\x18\x01 \x01(\x09B\x03\xE0A\x01H\x00\x12\x16\x0A\x07content\x18\x02 \x01(\x0CB\x03\xE0A\x01H\x00\x12\x12\x0A\x05docid\x18\x0F \x01(\x09B\x03\xE0A\x01\x12\x11\x0A\x09mime_type\x18\x03 \x01(\x09\x12\x11\x0A\x04text\x18\x04 \x01(\x09B\x03\xE0A\x01\x12C\x0A\x0Btext_styles\x18\x05 \x03(\x0B2*.google.cloud.documentai.v1.Document.StyleB\x02\x18\x01\x128\x0A\x05pages\x18\x06 \x03(\x0B2).google.cloud.documentai.v1.Document.Page\x12=\x0A\x08entities\x18\x07 \x03(\x0B2+.google.cloud.documentai.v1.Document.Entity\x12M\x0A\x10entity_relations\x18\x08 \x03(\x0B23.google.cloud.documentai.v1.Document.EntityRelation\x12E\x0A\x0Ctext_changes\x18\x0E \x03(\x0B2/.google.cloud.documentai.v1.Document.TextChange\x12B\x0A\x0Ashard_info\x18\x09 \x01(\x0B2..google.cloud.documentai.v1.Document.ShardInfo\x12!\x0A\x05error\x18\x0A \x01(\x0B2\x12.google.rpc.Status\x12@\x0A\x09revisions\x18\x0D \x03(\x0B2-.google.cloud.documentai.v1.Document.Revision\x12L\x0A\x0Fdocument_layout\x18\x11 \x01(\x0B23.google.cloud.documentai.v1.Document.DocumentLayout\x12N\x0A\x10chunked_document\x18\x12 \x01(\x0B24.google.cloud.documentai.v1.Document.ChunkedDocument\x12]\x0A\x18entity_validation_output\x18\x15 \x01(\x0B2;.google.cloud.documentai.v1.Document.EntityValidationOutput\x12Q\x0A\x12entities_revisions\x18\x16 \x03(\x0B25.google.cloud.documentai.v1.Document.EntitiesRevision\x12\x1C\x0A\x14entities_revision_id\x18\x17 \x01(\x09\x1AJ\x0A\x09ShardInfo\x12\x13\x0A\x0Bshard_index\x18\x01 \x01(\x03\x12\x13\x0A\x0Bshard_count\x18\x02 \x01(\x03\x12\x13\x0A\x0Btext_offset\x18\x03 \x01(\x03\x1A\xE5\x02\x0A\x05Style\x12D\x0A\x0Btext_anchor\x18\x01 \x01(\x0B2/.google.cloud.documentai.v1.Document.TextAnchor\x12!\x0A\x05color\x18\x02 \x01(\x0B2\x12.google.type.Color\x12,\x0A\x10background_color\x18\x03 \x01(\x0B2\x12.google.type.Color\x12\x13\x0A\x0Bfont_weight\x18\x04 \x01(\x09\x12\x12\x0A\x0Atext_style\x18\x05 \x01(\x09\x12\x17\x0A\x0Ftext_decoration\x18\x06 \x01(\x09\x12F\x0A\x09font_size\x18\x07 \x01(\x0B23.google.cloud.documentai.v1.Document.Style.FontSize\x12\x13\x0A\x0Bfont_family\x18\x08 \x01(\x09\x1A&\x0A\x08FontSize\x12\x0C\x0A\x04size\x18\x01 \x01(\x02\x12\x0C\x0A\x04unit\x18\x02 \x01(\x09\x1A\xC2)\x0A\x04Page\x12\x13\x0A\x0Bpage_number\x18\x01 \x01(\x05\x12>\x0A\x05image\x18\x0D \x01(\x0B2/.google.cloud.documentai.v1.Document.Page.Image\x12D\x0A\x0Atransforms\x18\x0E \x03(\x0B20.google.cloud.documentai.v1.Document.Page.Matrix\x12F\x0A\x09dimension\x18\x02 \x01(\x0B23.google.cloud.documentai.v1.Document.Page.Dimension\x12@\x0A\x06layout\x18\x03 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12V\x0A\x12detected_languages\x18\x04 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12?\x0A\x06blocks\x18\x05 \x03(\x0B2/.google.cloud.documentai.v1.Document.Page.Block\x12G\x0A\x0Aparagraphs\x18\x06 \x03(\x0B23.google.cloud.documentai.v1.Document.Page.Paragraph\x12=\x0A\x05lines\x18\x07 \x03(\x0B2..google.cloud.documentai.v1.Document.Page.Line\x12?\x0A\x06tokens\x18\x08 \x03(\x0B2/.google.cloud.documentai.v1.Document.Page.Token\x12P\x0A\x0Fvisual_elements\x18\x09 \x03(\x0B27.google.cloud.documentai.v1.Document.Page.VisualElement\x12?\x0A\x06tables\x18\x0A \x03(\x0B2/.google.cloud.documentai.v1.Document.Page.Table\x12H\x0A\x0Bform_fields\x18\x0B \x03(\x0B23.google.cloud.documentai.v1.Document.Page.FormField\x12A\x0A\x07symbols\x18\x0C \x03(\x0B20.google.cloud.documentai.v1.Document.Page.Symbol\x12T\x0A\x11detected_barcodes\x18\x0F \x03(\x0B29.google.cloud.documentai.v1.Document.Page.DetectedBarcode\x12Z\x0A\x14image_quality_scores\x18\x11 \x01(\x0B2<.google.cloud.documentai.v1.Document.Page.ImageQualityScores\x12G\x0A\x0Aprovenance\x18\x10 \x01(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1A8\x0A\x09Dimension\x12\x0D\x0A\x05width\x18\x01 \x01(\x02\x12\x0E\x0A\x06height\x18\x02 \x01(\x02\x12\x0C\x0A\x04unit\x18\x03 \x01(\x09\x1AJ\x0A\x05Image\x12\x0F\x0A\x07content\x18\x01 \x01(\x0C\x12\x11\x0A\x09mime_type\x18\x02 \x01(\x09\x12\x0D\x0A\x05width\x18\x03 \x01(\x05\x12\x0E\x0A\x06height\x18\x04 \x01(\x05\x1A@\x0A\x06Matrix\x12\x0C\x0A\x04rows\x18\x01 \x01(\x05\x12\x0C\x0A\x04cols\x18\x02 \x01(\x05\x12\x0C\x0A\x04type\x18\x03 \x01(\x05\x12\x0C\x0A\x04data\x18\x04 \x01(\x0C\x1A\xDD\x02\x0A\x06Layout\x12D\x0A\x0Btext_anchor\x18\x01 \x01(\x0B2/.google.cloud.documentai.v1.Document.TextAnchor\x12\x12\x0A\x0Aconfidence\x18\x02 \x01(\x02\x12?\x0A\x0Dbounding_poly\x18\x03 \x01(\x0B2(.google.cloud.documentai.v1.BoundingPoly\x12Q\x0A\x0Borientation\x18\x04 \x01(\x0E2<.google.cloud.documentai.v1.Document.Page.Layout.Orientation\"e\x0A\x0BOrientation\x12\x1B\x0A\x17ORIENTATION_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07PAGE_UP\x10\x01\x12\x0E\x0A\x0APAGE_RIGHT\x10\x02\x12\x0D\x0A\x09PAGE_DOWN\x10\x03\x12\x0D\x0A\x09PAGE_LEFT\x10\x04\x1A\xEA\x01\x0A\x05Block\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12V\x0A\x12detected_languages\x18\x02 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12G\x0A\x0Aprovenance\x18\x03 \x01(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1A\xEE\x01\x0A\x09Paragraph\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12V\x0A\x12detected_languages\x18\x02 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12G\x0A\x0Aprovenance\x18\x03 \x01(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1A\xE9\x01\x0A\x04Line\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12V\x0A\x12detected_languages\x18\x02 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12G\x0A\x0Aprovenance\x18\x03 \x01(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1A\x9E\x07\x0A\x05Token\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12U\x0A\x0Edetected_break\x18\x02 \x01(\x0B2=.google.cloud.documentai.v1.Document.Page.Token.DetectedBreak\x12V\x0A\x12detected_languages\x18\x03 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12G\x0A\x0Aprovenance\x18\x04 \x01(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x12M\x0A\x0Astyle_info\x18\x05 \x01(\x0B29.google.cloud.documentai.v1.Document.Page.Token.StyleInfo\x1A\xA6\x01\x0A\x0DDetectedBreak\x12P\x0A\x04type\x18\x01 \x01(\x0E2B.google.cloud.documentai.v1.Document.Page.Token.DetectedBreak.Type\"C\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x09\x0A\x05SPACE\x10\x01\x12\x0E\x0A\x0AWIDE_SPACE\x10\x02\x12\x0A\x0A\x06HYPHEN\x10\x03\x1A\xE2\x02\x0A\x09StyleInfo\x12\x11\x0A\x09font_size\x18\x01 \x01(\x05\x12\x17\x0A\x0Fpixel_font_size\x18\x02 \x01(\x01\x12\x16\x0A\x0Eletter_spacing\x18\x03 \x01(\x01\x12\x11\x0A\x09font_type\x18\x04 \x01(\x09\x12\x0C\x0A\x04bold\x18\x05 \x01(\x08\x12\x0E\x0A\x06italic\x18\x06 \x01(\x08\x12\x12\x0A\x0Aunderlined\x18\x07 \x01(\x08\x12\x11\x0A\x09strikeout\x18\x08 \x01(\x08\x12\x11\x0A\x09subscript\x18\x09 \x01(\x08\x12\x13\x0A\x0Bsuperscript\x18\x0A \x01(\x08\x12\x11\x0A\x09smallcaps\x18\x0B \x01(\x08\x12\x13\x0A\x0Bfont_weight\x18\x0C \x01(\x05\x12\x13\x0A\x0Bhandwritten\x18\x0D \x01(\x08\x12&\x0A\x0Atext_color\x18\x0E \x01(\x0B2\x12.google.type.Color\x12,\x0A\x10background_color\x18\x0F \x01(\x0B2\x12.google.type.Color\x1A\xA2\x01\x0A\x06Symbol\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12V\x0A\x12detected_languages\x18\x02 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x1A\xB7\x01\x0A\x0DVisualElement\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12\x0C\x0A\x04type\x18\x02 \x01(\x09\x12V\x0A\x12detected_languages\x18\x03 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x1A\xA8\x05\x0A\x05Table\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12M\x0A\x0Bheader_rows\x18\x02 \x03(\x0B28.google.cloud.documentai.v1.Document.Page.Table.TableRow\x12K\x0A\x09body_rows\x18\x03 \x03(\x0B28.google.cloud.documentai.v1.Document.Page.Table.TableRow\x12V\x0A\x12detected_languages\x18\x04 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12G\x0A\x0Aprovenance\x18\x05 \x01(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1AT\x0A\x08TableRow\x12H\x0A\x05cells\x18\x01 \x03(\x0B29.google.cloud.documentai.v1.Document.Page.Table.TableCell\x1A\xC9\x01\x0A\x09TableCell\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12\x10\x0A\x08row_span\x18\x02 \x01(\x05\x12\x10\x0A\x08col_span\x18\x03 \x01(\x05\x12V\x0A\x12detected_languages\x18\x04 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x1A\xE6\x03\x0A\x09FormField\x12D\x0A\x0Afield_name\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12E\x0A\x0Bfield_value\x18\x02 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12[\x0A\x17name_detected_languages\x18\x03 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12\\\x0A\x18value_detected_languages\x18\x04 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12\x12\x0A\x0Avalue_type\x18\x05 \x01(\x09\x12\x1A\x0A\x12corrected_key_text\x18\x06 \x01(\x09\x12\x1C\x0A\x14corrected_value_text\x18\x07 \x01(\x09\x12C\x0A\x0Aprovenance\x18\x08 \x01(\x0B2/.google.cloud.documentai.v1.Document.Provenance\x1A\x89\x01\x0A\x0FDetectedBarcode\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x124\x0A\x07barcode\x18\x02 \x01(\x0B2#.google.cloud.documentai.v1.Barcode\x1A=\x0A\x10DetectedLanguage\x12\x15\x0A\x0Dlanguage_code\x18\x01 \x01(\x09\x12\x12\x0A\x0Aconfidence\x18\x02 \x01(\x02\x1A\xC6\x01\x0A\x12ImageQualityScores\x12\x15\x0A\x0Dquality_score\x18\x01 \x01(\x02\x12e\x0A\x10detected_defects\x18\x02 \x03(\x0B2K.google.cloud.documentai.v1.Document.Page.ImageQualityScores.DetectedDefect\x1A2\x0A\x0EDetectedDefect\x12\x0C\x0A\x04type\x18\x01 \x01(\x09\x12\x12\x0A\x0Aconfidence\x18\x02 \x01(\x02\x1A\xEF\x07\x0A\x06Entity\x12I\x0A\x0Btext_anchor\x18\x01 \x01(\x0B2/.google.cloud.documentai.v1.Document.TextAnchorB\x03\xE0A\x01\x12\x11\x0A\x04type\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\x19\x0A\x0Cmention_text\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x17\x0A\x0Amention_id\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x17\x0A\x0Aconfidence\x18\x05 \x01(\x02B\x03\xE0A\x01\x12I\x0A\x0Bpage_anchor\x18\x06 \x01(\x0B2/.google.cloud.documentai.v1.Document.PageAnchorB\x03\xE0A\x01\x12\x0F\x0A\x02id\x18\x07 \x01(\x09B\x03\xE0A\x01\x12Z\x0A\x10normalized_value\x18\x09 \x01(\x0B2;.google.cloud.documentai.v1.Document.Entity.NormalizedValueB\x03\xE0A\x01\x12D\x0A\x0Aproperties\x18\x0A \x03(\x0B2+.google.cloud.documentai.v1.Document.EntityB\x03\xE0A\x01\x12H\x0A\x0Aprovenance\x18\x0B \x01(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x03\xE0A\x01\x12\x15\x0A\x08redacted\x18\x0C \x01(\x08B\x03\xE0A\x01\x12G\x0A\x06method\x18\x0F \x01(\x0E22.google.cloud.documentai.v1.Document.Entity.MethodB\x03\xE0A\x01\x1A\xD6\x02\x0A\x0FNormalizedValue\x12)\x0A\x0Bmoney_value\x18\x02 \x01(\x0B2\x12.google.type.MoneyH\x00\x12'\x0A\x0Adate_value\x18\x03 \x01(\x0B2\x11.google.type.DateH\x00\x12/\x0A\x0Edatetime_value\x18\x04 \x01(\x0B2\x15.google.type.DateTimeH\x00\x123\x0A\x0Daddress_value\x18\x05 \x01(\x0B2\x1A.google.type.PostalAddressH\x00\x12\x17\x0A\x0Dboolean_value\x18\x06 \x01(\x08H\x00\x12\x17\x0A\x0Dinteger_value\x18\x07 \x01(\x05H\x00\x12\x15\x0A\x0Bfloat_value\x18\x08 \x01(\x02H\x00\x12\x19\x0A\x0Fsignature_value\x18\x0A \x01(\x08H\x00\x12\x11\x0A\x04text\x18\x01 \x01(\x09B\x03\xE0A\x01B\x12\x0A\x10structured_value\"9\x0A\x06Method\x12\x16\x0A\x12METHOD_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07EXTRACT\x10\x01\x12\x0A\x0A\x06DERIVE\x10\x02\x1AI\x0A\x0EEntityRelation\x12\x12\x0A\x0Asubject_id\x18\x01 \x01(\x09\x12\x11\x0A\x09object_id\x18\x02 \x01(\x09\x12\x10\x0A\x08relation\x18\x03 \x01(\x09\x1A\xA8\x01\x0A\x0ATextAnchor\x12R\x0A\x0Dtext_segments\x18\x01 \x03(\x0B2;.google.cloud.documentai.v1.Document.TextAnchor.TextSegment\x12\x0F\x0A\x07content\x18\x02 \x01(\x09\x1A5\x0A\x0BTextSegment\x12\x13\x0A\x0Bstart_index\x18\x01 \x01(\x03\x12\x11\x0A\x09end_index\x18\x02 \x01(\x03\x1A\xD8\x03\x0A\x0APageAnchor\x12J\x0A\x09page_refs\x18\x01 \x03(\x0B27.google.cloud.documentai.v1.Document.PageAnchor.PageRef\x1A\xFD\x02\x0A\x07PageRef\x12\x11\x0A\x04page\x18\x01 \x01(\x03B\x03\xE0A\x02\x12\\\x0A\x0Blayout_type\x18\x02 \x01(\x0E2B.google.cloud.documentai.v1.Document.PageAnchor.PageRef.LayoutTypeB\x03\xE0A\x01\x12\x18\x0A\x09layout_id\x18\x03 \x01(\x09B\x05\x18\x01\xE0A\x01\x12D\x0A\x0Dbounding_poly\x18\x04 \x01(\x0B2(.google.cloud.documentai.v1.BoundingPolyB\x03\xE0A\x01\x12\x17\x0A\x0Aconfidence\x18\x05 \x01(\x02B\x03\xE0A\x01\"\x87\x01\x0A\x0ALayoutType\x12\x1B\x0A\x17LAYOUT_TYPE_UNSPECIFIED\x10\x00\x12\x09\x0A\x05BLOCK\x10\x01\x12\x0D\x0A\x09PARAGRAPH\x10\x02\x12\x08\x0A\x04LINE\x10\x03\x12\x09\x0A\x05TOKEN\x10\x04\x12\x12\x0A\x0EVISUAL_ELEMENT\x10\x05\x12\x09\x0A\x05TABLE\x10\x06\x12\x0E\x0A\x0AFORM_FIELD\x10\x07\x1A\xA8\x03\x0A\x0AProvenance\x12\x14\x0A\x08revision\x18\x01 \x01(\x05B\x02\x18\x01\x12\x0E\x0A\x02id\x18\x02 \x01(\x05B\x02\x18\x01\x12G\x0A\x07parents\x18\x03 \x03(\x0B26.google.cloud.documentai.v1.Document.Provenance.Parent\x12K\x0A\x04type\x18\x04 \x01(\x0E2=.google.cloud.documentai.v1.Document.Provenance.OperationType\x1A9\x0A\x06Parent\x12\x10\x0A\x08revision\x18\x01 \x01(\x05\x12\x0D\x0A\x05index\x18\x03 \x01(\x05\x12\x0E\x0A\x02id\x18\x02 \x01(\x05B\x02\x18\x01\"\xA2\x01\x0A\x0DOperationType\x12\x1E\x0A\x1AOPERATION_TYPE_UNSPECIFIED\x10\x00\x12\x07\x0A\x03ADD\x10\x01\x12\x0A\x0A\x06REMOVE\x10\x02\x12\x0A\x0A\x06UPDATE\x10\x07\x12\x0B\x0A\x07REPLACE\x10\x03\x12\x16\x0A\x0EEVAL_REQUESTED\x10\x04\x1A\x02\x08\x01\x12\x15\x0A\x0DEVAL_APPROVED\x10\x05\x1A\x02\x08\x01\x12\x14\x0A\x0CEVAL_SKIPPED\x10\x06\x1A\x02\x08\x01\x1A\xA5\x02\x0A\x08Revision\x12\x0F\x0A\x05agent\x18\x04 \x01(\x09H\x00\x12\x13\x0A\x09processor\x18\x05 \x01(\x09H\x00\x12\x0A\x0A\x02id\x18\x01 \x01(\x09\x12\x12\x0A\x06parent\x18\x02 \x03(\x05B\x02\x18\x01\x12\x12\x0A\x0Aparent_ids\x18\x07 \x03(\x09\x12/\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12O\x0A\x0Chuman_review\x18\x06 \x01(\x0B29.google.cloud.documentai.v1.Document.Revision.HumanReview\x1A3\x0A\x0BHumanReview\x12\x0D\x0A\x05state\x18\x01 \x01(\x09\x12\x15\x0A\x0Dstate_message\x18\x02 \x01(\x09B\x08\x0A\x06source\x1A\xB1\x01\x0A\x0ATextChange\x12D\x0A\x0Btext_anchor\x18\x01 \x01(\x0B2/.google.cloud.documentai.v1.Document.TextAnchor\x12\x14\x0A\x0Cchanged_text\x18\x02 \x01(\x09\x12G\x0A\x0Aprovenance\x18\x03 \x03(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1A\xDD\x0C\x0A\x0EDocumentLayout\x12W\x0A\x06blocks\x18\x01 \x03(\x0B2G.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock\x1A\xF1\x0B\x0A\x13DocumentLayoutBlock\x12m\x0A\x0Atext_block\x18\x02 \x01(\x0B2W.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlockH\x00\x12o\x0A\x0Btable_block\x18\x03 \x01(\x0B2X.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlockH\x00\x12m\x0A\x0Alist_block\x18\x04 \x01(\x0B2W.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlockH\x00\x12\x10\x0A\x08block_id\x18\x01 \x01(\x09\x12i\x0A\x09page_span\x18\x05 \x01(\x0B2V.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan\x12>\x0A\x0Cbounding_box\x18\x06 \x01(\x0B2(.google.cloud.documentai.v1.BoundingPoly\x1A6\x0A\x0ELayoutPageSpan\x12\x12\x0A\x0Apage_start\x18\x01 \x01(\x05\x12\x10\x0A\x08page_end\x18\x02 \x01(\x05\x1A\x86\x01\x0A\x0FLayoutTextBlock\x12\x0C\x0A\x04text\x18\x01 \x01(\x09\x12\x0C\x0A\x04type\x18\x02 \x01(\x09\x12W\x0A\x06blocks\x18\x03 \x03(\x0B2G.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock\x1A\xFB\x01\x0A\x10LayoutTableBlock\x12k\x0A\x0Bheader_rows\x18\x01 \x03(\x0B2V.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow\x12i\x0A\x09body_rows\x18\x02 \x03(\x0B2V.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow\x12\x0F\x0A\x07caption\x18\x03 \x01(\x09\x1Ax\x0A\x0ELayoutTableRow\x12f\x0A\x05cells\x18\x01 \x03(\x0B2W.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell\x1A\x8E\x01\x0A\x0FLayoutTableCell\x12W\x0A\x06blocks\x18\x01 \x03(\x0B2G.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock\x12\x10\x0A\x08row_span\x18\x02 \x01(\x05\x12\x10\x0A\x08col_span\x18\x03 \x01(\x05\x1A\x8E\x01\x0A\x0FLayoutListBlock\x12m\x0A\x0Clist_entries\x18\x01 \x03(\x0B2W.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry\x12\x0C\x0A\x04type\x18\x02 \x01(\x09\x1Aj\x0A\x0FLayoutListEntry\x12W\x0A\x06blocks\x18\x01 \x03(\x0B2G.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlockB\x07\x0A\x05block\x1A\xF8\x05\x0A\x0FChunkedDocument\x12J\x0A\x06chunks\x18\x01 \x03(\x0B2:.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk\x1A\x98\x05\x0A\x05Chunk\x12\x10\x0A\x08chunk_id\x18\x01 \x01(\x09\x12\x18\x0A\x10source_block_ids\x18\x02 \x03(\x09\x12\x0F\x0A\x07content\x18\x03 \x01(\x09\x12[\x0A\x09page_span\x18\x04 \x01(\x0B2H.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan\x12`\x0A\x0Cpage_headers\x18\x05 \x03(\x0B2J.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader\x12`\x0A\x0Cpage_footers\x18\x06 \x03(\x0B2J.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter\x1A5\x0A\x0DChunkPageSpan\x12\x12\x0A\x0Apage_start\x18\x01 \x01(\x05\x12\x10\x0A\x08page_end\x18\x02 \x01(\x05\x1A|\x0A\x0FChunkPageHeader\x12\x0C\x0A\x04text\x18\x01 \x01(\x09\x12[\x0A\x09page_span\x18\x02 \x01(\x0B2H.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan\x1A|\x0A\x0FChunkPageFooter\x12\x0C\x0A\x04text\x18\x01 \x01(\x09\x12[\x0A\x09page_span\x18\x02 \x01(\x0B2H.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan\x1A\xD2\x04\x0A\x16EntityValidationOutput\x12h\x0A\x12validation_results\x18\x01 \x03(\x0B2L.google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult\x12\x16\x0A\x0Epass_all_rules\x18\x02 \x01(\x08\x1A\xB5\x03\x0A\x10ValidationResult\x12\x11\x0A\x09rule_name\x18\x01 \x01(\x09\x12\x18\x0A\x10rule_description\x18\x02 \x01(\x09\x12\x81\x01\x0A\x16validation_result_type\x18\x03 \x01(\x0E2a.google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult.ValidationResultType\x12\x1A\x0A\x12validation_details\x18\x04 \x01(\x09\"\xD3\x01\x0A\x14ValidationResultType\x12&\x0A\"VALIDATION_RESULT_TYPE_UNSPECIFIED\x10\x00\x12 \x0A\x1CVALIDATION_RESULT_TYPE_VALID\x10\x01\x12\"\x0A\x1EVALIDATION_RESULT_TYPE_INVALID\x10\x02\x12\"\x0A\x1EVALIDATION_RESULT_TYPE_SKIPPED\x10\x03\x12)\x0A%VALIDATION_RESULT_TYPE_NOT_APPLICABLE\x10\x04\x1A\xC5\x01\x0A\x10EntitiesRevision\x12\x13\x0A\x0Brevision_id\x18\x01 \x01(\x09\x12=\x0A\x08entities\x18\x02 \x03(\x0B2+.google.cloud.documentai.v1.Document.Entity\x12]\x0A\x18entity_validation_output\x18\x03 \x01(\x0B2;.google.cloud.documentai.v1.Document.EntityValidationOutputB\x08\x0A\x06sourceB\xCB\x01\x0A\x1Ecom.google.cloud.documentai.v1B\x0DDocumentProtoP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xAA\x02\x1AGoogle.Cloud.DocumentAI.V1\xCA\x02\x1AGoogle\\Cloud\\DocumentAI\\V1\xEA\x02\x1DGoogle::Cloud::DocumentAI::V1b\x06proto3" + "\x0A\xEEp\x0A)google/cloud/documentai/v1/document.proto\x12\x1Agoogle.cloud.documentai.v1\x1A\x19google/api/resource.proto\x1A(google/cloud/documentai/v1/barcode.proto\x1A)google/cloud/documentai/v1/geometry.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x17google/rpc/status.proto\x1A\x17google/type/color.proto\x1A\x16google/type/date.proto\x1A\x1Agoogle/type/datetime.proto\x1A\x17google/type/money.proto\x1A google/type/postal_address.proto\"\x9Cl\x0A\x08Document\x12\x12\x0A\x03uri\x18\x01 \x01(\x09B\x03\xE0A\x01H\x00\x12\x16\x0A\x07content\x18\x02 \x01(\x0CB\x03\xE0A\x01H\x00\x12\x12\x0A\x05docid\x18\x0F \x01(\x09B\x03\xE0A\x01\x12\x11\x0A\x09mime_type\x18\x03 \x01(\x09\x12\x11\x0A\x04text\x18\x04 \x01(\x09B\x03\xE0A\x01\x12C\x0A\x0Btext_styles\x18\x05 \x03(\x0B2*.google.cloud.documentai.v1.Document.StyleB\x02\x18\x01\x128\x0A\x05pages\x18\x06 \x03(\x0B2).google.cloud.documentai.v1.Document.Page\x12=\x0A\x08entities\x18\x07 \x03(\x0B2+.google.cloud.documentai.v1.Document.Entity\x12M\x0A\x10entity_relations\x18\x08 \x03(\x0B23.google.cloud.documentai.v1.Document.EntityRelation\x12E\x0A\x0Ctext_changes\x18\x0E \x03(\x0B2/.google.cloud.documentai.v1.Document.TextChange\x12B\x0A\x0Ashard_info\x18\x09 \x01(\x0B2..google.cloud.documentai.v1.Document.ShardInfo\x12!\x0A\x05error\x18\x0A \x01(\x0B2\x12.google.rpc.Status\x12@\x0A\x09revisions\x18\x0D \x03(\x0B2-.google.cloud.documentai.v1.Document.Revision\x12L\x0A\x0Fdocument_layout\x18\x11 \x01(\x0B23.google.cloud.documentai.v1.Document.DocumentLayout\x12N\x0A\x10chunked_document\x18\x12 \x01(\x0B24.google.cloud.documentai.v1.Document.ChunkedDocument\x12H\x0A\x0Bblob_assets\x18\x13 \x03(\x0B2..google.cloud.documentai.v1.Document.BlobAssetB\x03\xE0A\x01\x12]\x0A\x18entity_validation_output\x18\x15 \x01(\x0B2;.google.cloud.documentai.v1.Document.EntityValidationOutput\x12Q\x0A\x12entities_revisions\x18\x16 \x03(\x0B25.google.cloud.documentai.v1.Document.EntitiesRevision\x12\x1C\x0A\x14entities_revision_id\x18\x17 \x01(\x09\x1AJ\x0A\x09ShardInfo\x12\x13\x0A\x0Bshard_index\x18\x01 \x01(\x03\x12\x13\x0A\x0Bshard_count\x18\x02 \x01(\x03\x12\x13\x0A\x0Btext_offset\x18\x03 \x01(\x03\x1A\xE5\x02\x0A\x05Style\x12D\x0A\x0Btext_anchor\x18\x01 \x01(\x0B2/.google.cloud.documentai.v1.Document.TextAnchor\x12!\x0A\x05color\x18\x02 \x01(\x0B2\x12.google.type.Color\x12,\x0A\x10background_color\x18\x03 \x01(\x0B2\x12.google.type.Color\x12\x13\x0A\x0Bfont_weight\x18\x04 \x01(\x09\x12\x12\x0A\x0Atext_style\x18\x05 \x01(\x09\x12\x17\x0A\x0Ftext_decoration\x18\x06 \x01(\x09\x12F\x0A\x09font_size\x18\x07 \x01(\x0B23.google.cloud.documentai.v1.Document.Style.FontSize\x12\x13\x0A\x0Bfont_family\x18\x08 \x01(\x09\x1A&\x0A\x08FontSize\x12\x0C\x0A\x04size\x18\x01 \x01(\x02\x12\x0C\x0A\x04unit\x18\x02 \x01(\x09\x1A\xC2)\x0A\x04Page\x12\x13\x0A\x0Bpage_number\x18\x01 \x01(\x05\x12>\x0A\x05image\x18\x0D \x01(\x0B2/.google.cloud.documentai.v1.Document.Page.Image\x12D\x0A\x0Atransforms\x18\x0E \x03(\x0B20.google.cloud.documentai.v1.Document.Page.Matrix\x12F\x0A\x09dimension\x18\x02 \x01(\x0B23.google.cloud.documentai.v1.Document.Page.Dimension\x12@\x0A\x06layout\x18\x03 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12V\x0A\x12detected_languages\x18\x04 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12?\x0A\x06blocks\x18\x05 \x03(\x0B2/.google.cloud.documentai.v1.Document.Page.Block\x12G\x0A\x0Aparagraphs\x18\x06 \x03(\x0B23.google.cloud.documentai.v1.Document.Page.Paragraph\x12=\x0A\x05lines\x18\x07 \x03(\x0B2..google.cloud.documentai.v1.Document.Page.Line\x12?\x0A\x06tokens\x18\x08 \x03(\x0B2/.google.cloud.documentai.v1.Document.Page.Token\x12P\x0A\x0Fvisual_elements\x18\x09 \x03(\x0B27.google.cloud.documentai.v1.Document.Page.VisualElement\x12?\x0A\x06tables\x18\x0A \x03(\x0B2/.google.cloud.documentai.v1.Document.Page.Table\x12H\x0A\x0Bform_fields\x18\x0B \x03(\x0B23.google.cloud.documentai.v1.Document.Page.FormField\x12A\x0A\x07symbols\x18\x0C \x03(\x0B20.google.cloud.documentai.v1.Document.Page.Symbol\x12T\x0A\x11detected_barcodes\x18\x0F \x03(\x0B29.google.cloud.documentai.v1.Document.Page.DetectedBarcode\x12Z\x0A\x14image_quality_scores\x18\x11 \x01(\x0B2<.google.cloud.documentai.v1.Document.Page.ImageQualityScores\x12G\x0A\x0Aprovenance\x18\x10 \x01(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1A8\x0A\x09Dimension\x12\x0D\x0A\x05width\x18\x01 \x01(\x02\x12\x0E\x0A\x06height\x18\x02 \x01(\x02\x12\x0C\x0A\x04unit\x18\x03 \x01(\x09\x1AJ\x0A\x05Image\x12\x0F\x0A\x07content\x18\x01 \x01(\x0C\x12\x11\x0A\x09mime_type\x18\x02 \x01(\x09\x12\x0D\x0A\x05width\x18\x03 \x01(\x05\x12\x0E\x0A\x06height\x18\x04 \x01(\x05\x1A@\x0A\x06Matrix\x12\x0C\x0A\x04rows\x18\x01 \x01(\x05\x12\x0C\x0A\x04cols\x18\x02 \x01(\x05\x12\x0C\x0A\x04type\x18\x03 \x01(\x05\x12\x0C\x0A\x04data\x18\x04 \x01(\x0C\x1A\xDD\x02\x0A\x06Layout\x12D\x0A\x0Btext_anchor\x18\x01 \x01(\x0B2/.google.cloud.documentai.v1.Document.TextAnchor\x12\x12\x0A\x0Aconfidence\x18\x02 \x01(\x02\x12?\x0A\x0Dbounding_poly\x18\x03 \x01(\x0B2(.google.cloud.documentai.v1.BoundingPoly\x12Q\x0A\x0Borientation\x18\x04 \x01(\x0E2<.google.cloud.documentai.v1.Document.Page.Layout.Orientation\"e\x0A\x0BOrientation\x12\x1B\x0A\x17ORIENTATION_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07PAGE_UP\x10\x01\x12\x0E\x0A\x0APAGE_RIGHT\x10\x02\x12\x0D\x0A\x09PAGE_DOWN\x10\x03\x12\x0D\x0A\x09PAGE_LEFT\x10\x04\x1A\xEA\x01\x0A\x05Block\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12V\x0A\x12detected_languages\x18\x02 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12G\x0A\x0Aprovenance\x18\x03 \x01(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1A\xEE\x01\x0A\x09Paragraph\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12V\x0A\x12detected_languages\x18\x02 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12G\x0A\x0Aprovenance\x18\x03 \x01(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1A\xE9\x01\x0A\x04Line\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12V\x0A\x12detected_languages\x18\x02 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12G\x0A\x0Aprovenance\x18\x03 \x01(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1A\x9E\x07\x0A\x05Token\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12U\x0A\x0Edetected_break\x18\x02 \x01(\x0B2=.google.cloud.documentai.v1.Document.Page.Token.DetectedBreak\x12V\x0A\x12detected_languages\x18\x03 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12G\x0A\x0Aprovenance\x18\x04 \x01(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x12M\x0A\x0Astyle_info\x18\x05 \x01(\x0B29.google.cloud.documentai.v1.Document.Page.Token.StyleInfo\x1A\xA6\x01\x0A\x0DDetectedBreak\x12P\x0A\x04type\x18\x01 \x01(\x0E2B.google.cloud.documentai.v1.Document.Page.Token.DetectedBreak.Type\"C\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x09\x0A\x05SPACE\x10\x01\x12\x0E\x0A\x0AWIDE_SPACE\x10\x02\x12\x0A\x0A\x06HYPHEN\x10\x03\x1A\xE2\x02\x0A\x09StyleInfo\x12\x11\x0A\x09font_size\x18\x01 \x01(\x05\x12\x17\x0A\x0Fpixel_font_size\x18\x02 \x01(\x01\x12\x16\x0A\x0Eletter_spacing\x18\x03 \x01(\x01\x12\x11\x0A\x09font_type\x18\x04 \x01(\x09\x12\x0C\x0A\x04bold\x18\x05 \x01(\x08\x12\x0E\x0A\x06italic\x18\x06 \x01(\x08\x12\x12\x0A\x0Aunderlined\x18\x07 \x01(\x08\x12\x11\x0A\x09strikeout\x18\x08 \x01(\x08\x12\x11\x0A\x09subscript\x18\x09 \x01(\x08\x12\x13\x0A\x0Bsuperscript\x18\x0A \x01(\x08\x12\x11\x0A\x09smallcaps\x18\x0B \x01(\x08\x12\x13\x0A\x0Bfont_weight\x18\x0C \x01(\x05\x12\x13\x0A\x0Bhandwritten\x18\x0D \x01(\x08\x12&\x0A\x0Atext_color\x18\x0E \x01(\x0B2\x12.google.type.Color\x12,\x0A\x10background_color\x18\x0F \x01(\x0B2\x12.google.type.Color\x1A\xA2\x01\x0A\x06Symbol\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12V\x0A\x12detected_languages\x18\x02 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x1A\xB7\x01\x0A\x0DVisualElement\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12\x0C\x0A\x04type\x18\x02 \x01(\x09\x12V\x0A\x12detected_languages\x18\x03 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x1A\xA8\x05\x0A\x05Table\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12M\x0A\x0Bheader_rows\x18\x02 \x03(\x0B28.google.cloud.documentai.v1.Document.Page.Table.TableRow\x12K\x0A\x09body_rows\x18\x03 \x03(\x0B28.google.cloud.documentai.v1.Document.Page.Table.TableRow\x12V\x0A\x12detected_languages\x18\x04 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12G\x0A\x0Aprovenance\x18\x05 \x01(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1AT\x0A\x08TableRow\x12H\x0A\x05cells\x18\x01 \x03(\x0B29.google.cloud.documentai.v1.Document.Page.Table.TableCell\x1A\xC9\x01\x0A\x09TableCell\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12\x10\x0A\x08row_span\x18\x02 \x01(\x05\x12\x10\x0A\x08col_span\x18\x03 \x01(\x05\x12V\x0A\x12detected_languages\x18\x04 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x1A\xE6\x03\x0A\x09FormField\x12D\x0A\x0Afield_name\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12E\x0A\x0Bfield_value\x18\x02 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12[\x0A\x17name_detected_languages\x18\x03 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12\\\x0A\x18value_detected_languages\x18\x04 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12\x12\x0A\x0Avalue_type\x18\x05 \x01(\x09\x12\x1A\x0A\x12corrected_key_text\x18\x06 \x01(\x09\x12\x1C\x0A\x14corrected_value_text\x18\x07 \x01(\x09\x12C\x0A\x0Aprovenance\x18\x08 \x01(\x0B2/.google.cloud.documentai.v1.Document.Provenance\x1A\x89\x01\x0A\x0FDetectedBarcode\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x124\x0A\x07barcode\x18\x02 \x01(\x0B2#.google.cloud.documentai.v1.Barcode\x1A=\x0A\x10DetectedLanguage\x12\x15\x0A\x0Dlanguage_code\x18\x01 \x01(\x09\x12\x12\x0A\x0Aconfidence\x18\x02 \x01(\x02\x1A\xC6\x01\x0A\x12ImageQualityScores\x12\x15\x0A\x0Dquality_score\x18\x01 \x01(\x02\x12e\x0A\x10detected_defects\x18\x02 \x03(\x0B2K.google.cloud.documentai.v1.Document.Page.ImageQualityScores.DetectedDefect\x1A2\x0A\x0EDetectedDefect\x12\x0C\x0A\x04type\x18\x01 \x01(\x09\x12\x12\x0A\x0Aconfidence\x18\x02 \x01(\x02\x1A\xEF\x07\x0A\x06Entity\x12I\x0A\x0Btext_anchor\x18\x01 \x01(\x0B2/.google.cloud.documentai.v1.Document.TextAnchorB\x03\xE0A\x01\x12\x11\x0A\x04type\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\x19\x0A\x0Cmention_text\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x17\x0A\x0Amention_id\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x17\x0A\x0Aconfidence\x18\x05 \x01(\x02B\x03\xE0A\x01\x12I\x0A\x0Bpage_anchor\x18\x06 \x01(\x0B2/.google.cloud.documentai.v1.Document.PageAnchorB\x03\xE0A\x01\x12\x0F\x0A\x02id\x18\x07 \x01(\x09B\x03\xE0A\x01\x12Z\x0A\x10normalized_value\x18\x09 \x01(\x0B2;.google.cloud.documentai.v1.Document.Entity.NormalizedValueB\x03\xE0A\x01\x12D\x0A\x0Aproperties\x18\x0A \x03(\x0B2+.google.cloud.documentai.v1.Document.EntityB\x03\xE0A\x01\x12H\x0A\x0Aprovenance\x18\x0B \x01(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x03\xE0A\x01\x12\x15\x0A\x08redacted\x18\x0C \x01(\x08B\x03\xE0A\x01\x12G\x0A\x06method\x18\x0F \x01(\x0E22.google.cloud.documentai.v1.Document.Entity.MethodB\x03\xE0A\x01\x1A\xD6\x02\x0A\x0FNormalizedValue\x12)\x0A\x0Bmoney_value\x18\x02 \x01(\x0B2\x12.google.type.MoneyH\x00\x12'\x0A\x0Adate_value\x18\x03 \x01(\x0B2\x11.google.type.DateH\x00\x12/\x0A\x0Edatetime_value\x18\x04 \x01(\x0B2\x15.google.type.DateTimeH\x00\x123\x0A\x0Daddress_value\x18\x05 \x01(\x0B2\x1A.google.type.PostalAddressH\x00\x12\x17\x0A\x0Dboolean_value\x18\x06 \x01(\x08H\x00\x12\x17\x0A\x0Dinteger_value\x18\x07 \x01(\x05H\x00\x12\x15\x0A\x0Bfloat_value\x18\x08 \x01(\x02H\x00\x12\x19\x0A\x0Fsignature_value\x18\x0A \x01(\x08H\x00\x12\x11\x0A\x04text\x18\x01 \x01(\x09B\x03\xE0A\x01B\x12\x0A\x10structured_value\"9\x0A\x06Method\x12\x16\x0A\x12METHOD_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07EXTRACT\x10\x01\x12\x0A\x0A\x06DERIVE\x10\x02\x1AI\x0A\x0EEntityRelation\x12\x12\x0A\x0Asubject_id\x18\x01 \x01(\x09\x12\x11\x0A\x09object_id\x18\x02 \x01(\x09\x12\x10\x0A\x08relation\x18\x03 \x01(\x09\x1A\xA8\x01\x0A\x0ATextAnchor\x12R\x0A\x0Dtext_segments\x18\x01 \x03(\x0B2;.google.cloud.documentai.v1.Document.TextAnchor.TextSegment\x12\x0F\x0A\x07content\x18\x02 \x01(\x09\x1A5\x0A\x0BTextSegment\x12\x13\x0A\x0Bstart_index\x18\x01 \x01(\x03\x12\x11\x0A\x09end_index\x18\x02 \x01(\x03\x1A\xD8\x03\x0A\x0APageAnchor\x12J\x0A\x09page_refs\x18\x01 \x03(\x0B27.google.cloud.documentai.v1.Document.PageAnchor.PageRef\x1A\xFD\x02\x0A\x07PageRef\x12\x11\x0A\x04page\x18\x01 \x01(\x03B\x03\xE0A\x02\x12\\\x0A\x0Blayout_type\x18\x02 \x01(\x0E2B.google.cloud.documentai.v1.Document.PageAnchor.PageRef.LayoutTypeB\x03\xE0A\x01\x12\x18\x0A\x09layout_id\x18\x03 \x01(\x09B\x05\x18\x01\xE0A\x01\x12D\x0A\x0Dbounding_poly\x18\x04 \x01(\x0B2(.google.cloud.documentai.v1.BoundingPolyB\x03\xE0A\x01\x12\x17\x0A\x0Aconfidence\x18\x05 \x01(\x02B\x03\xE0A\x01\"\x87\x01\x0A\x0ALayoutType\x12\x1B\x0A\x17LAYOUT_TYPE_UNSPECIFIED\x10\x00\x12\x09\x0A\x05BLOCK\x10\x01\x12\x0D\x0A\x09PARAGRAPH\x10\x02\x12\x08\x0A\x04LINE\x10\x03\x12\x09\x0A\x05TOKEN\x10\x04\x12\x12\x0A\x0EVISUAL_ELEMENT\x10\x05\x12\x09\x0A\x05TABLE\x10\x06\x12\x0E\x0A\x0AFORM_FIELD\x10\x07\x1A\xA8\x03\x0A\x0AProvenance\x12\x14\x0A\x08revision\x18\x01 \x01(\x05B\x02\x18\x01\x12\x0E\x0A\x02id\x18\x02 \x01(\x05B\x02\x18\x01\x12G\x0A\x07parents\x18\x03 \x03(\x0B26.google.cloud.documentai.v1.Document.Provenance.Parent\x12K\x0A\x04type\x18\x04 \x01(\x0E2=.google.cloud.documentai.v1.Document.Provenance.OperationType\x1A9\x0A\x06Parent\x12\x10\x0A\x08revision\x18\x01 \x01(\x05\x12\x0D\x0A\x05index\x18\x03 \x01(\x05\x12\x0E\x0A\x02id\x18\x02 \x01(\x05B\x02\x18\x01\"\xA2\x01\x0A\x0DOperationType\x12\x1E\x0A\x1AOPERATION_TYPE_UNSPECIFIED\x10\x00\x12\x07\x0A\x03ADD\x10\x01\x12\x0A\x0A\x06REMOVE\x10\x02\x12\x0A\x0A\x06UPDATE\x10\x07\x12\x0B\x0A\x07REPLACE\x10\x03\x12\x16\x0A\x0EEVAL_REQUESTED\x10\x04\x1A\x02\x08\x01\x12\x15\x0A\x0DEVAL_APPROVED\x10\x05\x1A\x02\x08\x01\x12\x14\x0A\x0CEVAL_SKIPPED\x10\x06\x1A\x02\x08\x01\x1A\xA5\x02\x0A\x08Revision\x12\x0F\x0A\x05agent\x18\x04 \x01(\x09H\x00\x12\x13\x0A\x09processor\x18\x05 \x01(\x09H\x00\x12\x0A\x0A\x02id\x18\x01 \x01(\x09\x12\x12\x0A\x06parent\x18\x02 \x03(\x05B\x02\x18\x01\x12\x12\x0A\x0Aparent_ids\x18\x07 \x03(\x09\x12/\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12O\x0A\x0Chuman_review\x18\x06 \x01(\x0B29.google.cloud.documentai.v1.Document.Revision.HumanReview\x1A3\x0A\x0BHumanReview\x12\x0D\x0A\x05state\x18\x01 \x01(\x09\x12\x15\x0A\x0Dstate_message\x18\x02 \x01(\x09B\x08\x0A\x06source\x1A\xB1\x01\x0A\x0ATextChange\x12D\x0A\x0Btext_anchor\x18\x01 \x01(\x0B2/.google.cloud.documentai.v1.Document.TextAnchor\x12\x14\x0A\x0Cchanged_text\x18\x02 \x01(\x09\x12G\x0A\x0Aprovenance\x18\x03 \x03(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1A\"\x0A\x0BAnnotations\x12\x13\x0A\x0Bdescription\x18\x01 \x01(\x09\x1A\xBE\x10\x0A\x0EDocumentLayout\x12W\x0A\x06blocks\x18\x01 \x03(\x0B2G.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock\x1A\xD2\x0F\x0A\x13DocumentLayoutBlock\x12m\x0A\x0Atext_block\x18\x02 \x01(\x0B2W.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlockH\x00\x12o\x0A\x0Btable_block\x18\x03 \x01(\x0B2X.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlockH\x00\x12m\x0A\x0Alist_block\x18\x04 \x01(\x0B2W.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlockH\x00\x12o\x0A\x0Bimage_block\x18\x07 \x01(\x0B2X.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlockH\x00\x12\x10\x0A\x08block_id\x18\x01 \x01(\x09\x12i\x0A\x09page_span\x18\x05 \x01(\x0B2V.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan\x12>\x0A\x0Cbounding_box\x18\x06 \x01(\x0B2(.google.cloud.documentai.v1.BoundingPoly\x1A6\x0A\x0ELayoutPageSpan\x12\x12\x0A\x0Apage_start\x18\x01 \x01(\x05\x12\x10\x0A\x08page_end\x18\x02 \x01(\x05\x1A\xCD\x01\x0A\x0FLayoutTextBlock\x12\x0C\x0A\x04text\x18\x01 \x01(\x09\x12\x0C\x0A\x04type\x18\x02 \x01(\x09\x12W\x0A\x06blocks\x18\x03 \x03(\x0B2G.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock\x12E\x0A\x0Bannotations\x18\x04 \x01(\x0B20.google.cloud.documentai.v1.Document.Annotations\x1A\xC2\x02\x0A\x10LayoutTableBlock\x12k\x0A\x0Bheader_rows\x18\x01 \x03(\x0B2V.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow\x12i\x0A\x09body_rows\x18\x02 \x03(\x0B2V.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow\x12\x0F\x0A\x07caption\x18\x03 \x01(\x09\x12E\x0A\x0Bannotations\x18\x04 \x01(\x0B20.google.cloud.documentai.v1.Document.Annotations\x1Ax\x0A\x0ELayoutTableRow\x12f\x0A\x05cells\x18\x01 \x03(\x0B2W.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell\x1A\x8E\x01\x0A\x0FLayoutTableCell\x12W\x0A\x06blocks\x18\x01 \x03(\x0B2G.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock\x12\x10\x0A\x08row_span\x18\x02 \x01(\x05\x12\x10\x0A\x08col_span\x18\x03 \x01(\x05\x1A\x8E\x01\x0A\x0FLayoutListBlock\x12m\x0A\x0Clist_entries\x18\x01 \x03(\x0B2W.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry\x12\x0C\x0A\x04type\x18\x02 \x01(\x09\x1Aj\x0A\x0FLayoutListEntry\x12W\x0A\x06blocks\x18\x01 \x03(\x0B2G.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock\x1A\xDF\x01\x0A\x10LayoutImageBlock\x12\x1C\x0A\x0Dblob_asset_id\x18\x04 \x01(\x09B\x03\xE0A\x01H\x00\x12\x16\x0A\x07gcs_uri\x18\x05 \x01(\x09B\x03\xE0A\x01H\x00\x12\x17\x0A\x08data_uri\x18\x06 \x01(\x09B\x03\xE0A\x01H\x00\x12\x11\x0A\x09mime_type\x18\x01 \x01(\x09\x12\x12\x0A\x0Aimage_text\x18\x02 \x01(\x09\x12E\x0A\x0Bannotations\x18\x03 \x01(\x0B20.google.cloud.documentai.v1.Document.AnnotationsB\x0E\x0A\x0Cimage_sourceB\x07\x0A\x05block\x1A\xD8\x0A\x0A\x0FChunkedDocument\x12J\x0A\x06chunks\x18\x01 \x03(\x0B2:.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk\x1A\xF8\x09\x0A\x05Chunk\x12\x10\x0A\x08chunk_id\x18\x01 \x01(\x09\x12\x18\x0A\x10source_block_ids\x18\x02 \x03(\x09\x12\x0F\x0A\x07content\x18\x03 \x01(\x09\x12[\x0A\x09page_span\x18\x04 \x01(\x0B2H.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan\x12`\x0A\x0Cpage_headers\x18\x05 \x03(\x0B2J.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader\x12`\x0A\x0Cpage_footers\x18\x06 \x03(\x0B2J.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter\x12[\x0A\x0Cchunk_fields\x18\x07 \x03(\x0B2E.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField\x1A5\x0A\x0DChunkPageSpan\x12\x12\x0A\x0Apage_start\x18\x01 \x01(\x05\x12\x10\x0A\x08page_end\x18\x02 \x01(\x05\x1A|\x0A\x0FChunkPageHeader\x12\x0C\x0A\x04text\x18\x01 \x01(\x09\x12[\x0A\x09page_span\x18\x02 \x01(\x0B2H.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan\x1A|\x0A\x0FChunkPageFooter\x12\x0C\x0A\x04text\x18\x01 \x01(\x09\x12[\x0A\x09page_span\x18\x02 \x01(\x0B2H.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan\x1A\xB7\x01\x0A\x0FImageChunkField\x12\x1C\x0A\x0Dblob_asset_id\x18\x01 \x01(\x09B\x03\xE0A\x01H\x00\x12\x16\x0A\x07gcs_uri\x18\x02 \x01(\x09B\x03\xE0A\x01H\x00\x12\x17\x0A\x08data_uri\x18\x03 \x01(\x09B\x03\xE0A\x01H\x00\x12E\x0A\x0Bannotations\x18\x04 \x01(\x0B20.google.cloud.documentai.v1.Document.AnnotationsB\x0E\x0A\x0Cimage_source\x1AX\x0A\x0FTableChunkField\x12E\x0A\x0Bannotations\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Annotations\x1A\xEC\x01\x0A\x0AChunkField\x12g\x0A\x11image_chunk_field\x18\x01 \x01(\x0B2J.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkFieldH\x00\x12g\x0A\x11table_chunk_field\x18\x02 \x01(\x0B2J.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkFieldH\x00B\x0C\x0A\x0Afield_type\x1AK\x0A\x09BlobAsset\x12\x15\x0A\x08asset_id\x18\x01 \x01(\x09B\x03\xE0A\x01\x12\x14\x0A\x07content\x18\x02 \x01(\x0CB\x03\xE0A\x01\x12\x11\x0A\x09mime_type\x18\x03 \x01(\x09\x1A\xD2\x04\x0A\x16EntityValidationOutput\x12h\x0A\x12validation_results\x18\x01 \x03(\x0B2L.google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult\x12\x16\x0A\x0Epass_all_rules\x18\x02 \x01(\x08\x1A\xB5\x03\x0A\x10ValidationResult\x12\x11\x0A\x09rule_name\x18\x01 \x01(\x09\x12\x18\x0A\x10rule_description\x18\x02 \x01(\x09\x12\x81\x01\x0A\x16validation_result_type\x18\x03 \x01(\x0E2a.google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult.ValidationResultType\x12\x1A\x0A\x12validation_details\x18\x04 \x01(\x09\"\xD3\x01\x0A\x14ValidationResultType\x12&\x0A\"VALIDATION_RESULT_TYPE_UNSPECIFIED\x10\x00\x12 \x0A\x1CVALIDATION_RESULT_TYPE_VALID\x10\x01\x12\"\x0A\x1EVALIDATION_RESULT_TYPE_INVALID\x10\x02\x12\"\x0A\x1EVALIDATION_RESULT_TYPE_SKIPPED\x10\x03\x12)\x0A%VALIDATION_RESULT_TYPE_NOT_APPLICABLE\x10\x04\x1A\xC5\x01\x0A\x10EntitiesRevision\x12\x13\x0A\x0Brevision_id\x18\x01 \x01(\x09\x12=\x0A\x08entities\x18\x02 \x03(\x0B2+.google.cloud.documentai.v1.Document.Entity\x12]\x0A\x18entity_validation_output\x18\x03 \x01(\x0B2;.google.cloud.documentai.v1.Document.EntityValidationOutputB\x08\x0A\x06sourceB\xCB\x01\x0A\x1Ecom.google.cloud.documentai.v1B\x0DDocumentProtoP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xAA\x02\x1AGoogle.Cloud.DocumentAI.V1\xCA\x02\x1AGoogle\\Cloud\\DocumentAI\\V1\xEA\x02\x1DGoogle::Cloud::DocumentAI::V1b\x06proto3" , true); static::$is_initialized = true; diff --git a/DocumentAi/src/V1/Document.php b/DocumentAi/src/V1/Document.php index 78a7aff4bda4..7479847bda67 100644 --- a/DocumentAi/src/V1/Document.php +++ b/DocumentAi/src/V1/Document.php @@ -105,6 +105,15 @@ class Document extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.documentai.v1.Document.ChunkedDocument chunked_document = 18; */ protected $chunked_document = null; + /** + * Optional. The blob assets in this document. This is used to store the + * content of the inline blobs in this document, for example, image bytes, + * such that it can be referenced by other fields in the document via asset + * id. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $blob_assets; /** * The entity validation output for the document. This is the validation * output for `document.entities` field. @@ -124,7 +133,7 @@ class Document extends \Google\Protobuf\Internal\Message * The entity revision ID that `document.entities` field is based on. * If this field is set and `entities_revisions` is not empty, the entities in * `document.entities` field are the entities in the entity revision with this - * ID and `document.entity_validation_output` field is the + * id and `document.entity_validation_output` field is the * `entity_validation_output` field in this entity revision. * * Generated from protobuf field string entities_revision_id = 23; @@ -181,6 +190,11 @@ class Document extends \Google\Protobuf\Internal\Message * Parsed layout of the document. * @type \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument $chunked_document * Document chunked based on chunking config. + * @type \Google\Cloud\DocumentAI\V1\Document\BlobAsset[] $blob_assets + * Optional. The blob assets in this document. This is used to store the + * content of the inline blobs in this document, for example, image bytes, + * such that it can be referenced by other fields in the document via asset + * id. * @type \Google\Cloud\DocumentAI\V1\Document\EntityValidationOutput $entity_validation_output * The entity validation output for the document. This is the validation * output for `document.entities` field. @@ -192,7 +206,7 @@ class Document extends \Google\Protobuf\Internal\Message * The entity revision ID that `document.entities` field is based on. * If this field is set and `entities_revisions` is not empty, the entities in * `document.entities` field are the entities in the entity revision with this - * ID and `document.entity_validation_output` field is the + * id and `document.entity_validation_output` field is the * `entity_validation_output` field in this entity revision. * } */ @@ -675,6 +689,38 @@ public function setChunkedDocument($var) return $this; } + /** + * Optional. The blob assets in this document. This is used to store the + * content of the inline blobs in this document, for example, image bytes, + * such that it can be referenced by other fields in the document via asset + * id. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\BlobAsset> + */ + public function getBlobAssets() + { + return $this->blob_assets; + } + + /** + * Optional. The blob assets in this document. This is used to store the + * content of the inline blobs in this document, for example, image bytes, + * such that it can be referenced by other fields in the document via asset + * id. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\DocumentAI\V1\Document\BlobAsset[] $var + * @return $this + */ + public function setBlobAssets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\BlobAsset::class); + $this->blob_assets = $arr; + + return $this; + } + /** * The entity validation output for the document. This is the validation * output for `document.entities` field. @@ -747,7 +793,7 @@ public function setEntitiesRevisions($var) * The entity revision ID that `document.entities` field is based on. * If this field is set and `entities_revisions` is not empty, the entities in * `document.entities` field are the entities in the entity revision with this - * ID and `document.entity_validation_output` field is the + * id and `document.entity_validation_output` field is the * `entity_validation_output` field in this entity revision. * * Generated from protobuf field string entities_revision_id = 23; @@ -762,7 +808,7 @@ public function getEntitiesRevisionId() * The entity revision ID that `document.entities` field is based on. * If this field is set and `entities_revisions` is not empty, the entities in * `document.entities` field are the entities in the entity revision with this - * ID and `document.entity_validation_output` field is the + * id and `document.entity_validation_output` field is the * `entity_validation_output` field in this entity revision. * * Generated from protobuf field string entities_revision_id = 23; diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Annotations.php b/DocumentAi/src/V1/Document/Annotations.php similarity index 100% rename from owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Annotations.php rename to DocumentAi/src/V1/Document/Annotations.php diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/BlobAsset.php b/DocumentAi/src/V1/Document/BlobAsset.php similarity index 100% rename from owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/BlobAsset.php rename to DocumentAi/src/V1/Document/BlobAsset.php diff --git a/DocumentAi/src/V1/Document/ChunkedDocument/Chunk.php b/DocumentAi/src/V1/Document/ChunkedDocument/Chunk.php index b275ec0c1105..5823a992d478 100644 --- a/DocumentAi/src/V1/Document/ChunkedDocument/Chunk.php +++ b/DocumentAi/src/V1/Document/ChunkedDocument/Chunk.php @@ -51,6 +51,12 @@ class Chunk extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; */ private $page_footers; + /** + * Chunk fields inside this chunk. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; + */ + private $chunk_fields; /** * Constructor. @@ -70,6 +76,8 @@ class Chunk extends \Google\Protobuf\Internal\Message * Page headers associated with the chunk. * @type \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageFooter[] $page_footers * Page footers associated with the chunk. + * @type \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkField[] $chunk_fields + * Chunk fields inside this chunk. * } */ public function __construct($data = NULL) { @@ -243,5 +251,31 @@ public function setPageFooters($var) return $this; } + /** + * Chunk fields inside this chunk. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; + * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkField> + */ + public function getChunkFields() + { + return $this->chunk_fields; + } + + /** + * Chunk fields inside this chunk. + * + * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; + * @param \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkField[] $var + * @return $this + */ + public function setChunkFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkField::class); + $this->chunk_fields = $arr; + + return $this; + } + } diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ChunkField.php b/DocumentAi/src/V1/Document/ChunkedDocument/Chunk/ChunkField.php similarity index 100% rename from owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ChunkField.php rename to DocumentAi/src/V1/Document/ChunkedDocument/Chunk/ChunkField.php diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ImageChunkField.php b/DocumentAi/src/V1/Document/ChunkedDocument/Chunk/ImageChunkField.php similarity index 100% rename from owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ImageChunkField.php rename to DocumentAi/src/V1/Document/ChunkedDocument/Chunk/ImageChunkField.php diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/TableChunkField.php b/DocumentAi/src/V1/Document/ChunkedDocument/Chunk/TableChunkField.php similarity index 100% rename from owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/TableChunkField.php rename to DocumentAi/src/V1/Document/ChunkedDocument/Chunk/TableChunkField.php diff --git a/DocumentAi/src/V1/Document/DocumentLayout/DocumentLayoutBlock.php b/DocumentAi/src/V1/Document/DocumentLayout/DocumentLayoutBlock.php index 7b736a0aa077..a1a42fb47bc6 100644 --- a/DocumentAi/src/V1/Document/DocumentLayout/DocumentLayoutBlock.php +++ b/DocumentAi/src/V1/Document/DocumentLayout/DocumentLayoutBlock.php @@ -48,6 +48,8 @@ class DocumentLayoutBlock extends \Google\Protobuf\Internal\Message * Block consisting of table content/structure. * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutListBlock $list_block * Block consisting of list content/structure. + * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutImageBlock $image_block + * Block consisting of image content. * @type string $block_id * ID of the block. * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutPageSpan $page_span @@ -154,6 +156,37 @@ public function setListBlock($var) return $this; } + /** + * Block consisting of image content. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock image_block = 7; + * @return \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutImageBlock|null + */ + public function getImageBlock() + { + return $this->readOneof(7); + } + + public function hasImageBlock() + { + return $this->hasOneof(7); + } + + /** + * Block consisting of image content. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock image_block = 7; + * @param \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutImageBlock $var + * @return $this + */ + public function setImageBlock($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutImageBlock::class); + $this->writeOneof(7, $var); + + return $this; + } + /** * ID of the block. * diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutImageBlock.php b/DocumentAi/src/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutImageBlock.php similarity index 100% rename from owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutImageBlock.php rename to DocumentAi/src/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutImageBlock.php diff --git a/DocumentAi/src/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTableBlock.php b/DocumentAi/src/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTableBlock.php index bdfbe8981498..ca77f5876611 100644 --- a/DocumentAi/src/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTableBlock.php +++ b/DocumentAi/src/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTableBlock.php @@ -33,6 +33,12 @@ class LayoutTableBlock extends \Google\Protobuf\Internal\Message * Generated from protobuf field string caption = 3; */ protected $caption = ''; + /** + * Annotation of the table block. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + protected $annotations = null; /** * Constructor. @@ -46,6 +52,8 @@ class LayoutTableBlock extends \Google\Protobuf\Internal\Message * Body rows containing main table content. * @type string $caption * Table caption/title. + * @type \Google\Cloud\DocumentAI\V1\Document\Annotations $annotations + * Annotation of the table block. * } */ public function __construct($data = NULL) { @@ -131,5 +139,41 @@ public function setCaption($var) return $this; } + /** + * Annotation of the table block. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Annotations annotations = 4; + * @return \Google\Cloud\DocumentAI\V1\Document\Annotations|null + */ + public function getAnnotations() + { + return $this->annotations; + } + + public function hasAnnotations() + { + return isset($this->annotations); + } + + public function clearAnnotations() + { + unset($this->annotations); + } + + /** + * Annotation of the table block. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Annotations annotations = 4; + * @param \Google\Cloud\DocumentAI\V1\Document\Annotations $var + * @return $this + */ + public function setAnnotations($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Annotations::class); + $this->annotations = $var; + + return $this; + } + } diff --git a/DocumentAi/src/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTextBlock.php b/DocumentAi/src/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTextBlock.php index 9febff016e5b..ca3cc05bb93d 100644 --- a/DocumentAi/src/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTextBlock.php +++ b/DocumentAi/src/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTextBlock.php @@ -36,6 +36,12 @@ class LayoutTextBlock extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; */ private $blocks; + /** + * Annotation of the text block. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + protected $annotations = null; /** * Constructor. @@ -52,6 +58,8 @@ class LayoutTextBlock extends \Google\Protobuf\Internal\Message * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock[] $blocks * A text block could further have child blocks. * Repeated blocks support further hierarchies and nested blocks. + * @type \Google\Cloud\DocumentAI\V1\Document\Annotations $annotations + * Annotation of the text block. * } */ public function __construct($data = NULL) { @@ -143,5 +151,41 @@ public function setBlocks($var) return $this; } + /** + * Annotation of the text block. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Annotations annotations = 4; + * @return \Google\Cloud\DocumentAI\V1\Document\Annotations|null + */ + public function getAnnotations() + { + return $this->annotations; + } + + public function hasAnnotations() + { + return isset($this->annotations); + } + + public function clearAnnotations() + { + unset($this->annotations); + } + + /** + * Annotation of the text block. + * + * Generated from protobuf field .google.cloud.documentai.v1.Document.Annotations annotations = 4; + * @param \Google\Cloud\DocumentAI\V1\Document\Annotations $var + * @return $this + */ + public function setAnnotations($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Annotations::class); + $this->annotations = $var; + + return $this; + } + } diff --git a/DocumentAi/src/V1/Document/Entity.php b/DocumentAi/src/V1/Document/Entity.php index 976c3e388b69..70e64e229c93 100644 --- a/DocumentAi/src/V1/Document/Entity.php +++ b/DocumentAi/src/V1/Document/Entity.php @@ -26,13 +26,14 @@ class Entity extends \Google\Protobuf\Internal\Message */ protected $text_anchor = null; /** - * Required. Entity type from a schema e.g. `Address`. + * Required. Entity type from a schema, for example, `Address`. * * Generated from protobuf field string type = 2 [(.google.api.field_behavior) = REQUIRED]; */ protected $type = ''; /** - * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`. + * Optional. Text value of the entity, for example, `1600 Amphitheatre + * Pkwy`. * * Generated from protobuf field string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -65,9 +66,9 @@ class Entity extends \Google\Protobuf\Internal\Message protected $id = ''; /** * Optional. Normalized entity value. Absent if the extracted value could - * not be converted or the type (e.g. address) is not supported for certain - * parsers. This field is also only populated for certain supported document - * types. + * not be converted or the type (for example, address) is not supported for + * certain parsers. This field is also only populated for certain supported + * document types. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Entity.NormalizedValue normalized_value = 9 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -110,9 +111,10 @@ class Entity extends \Google\Protobuf\Internal\Message * Text anchor indexing into the * [Document.text][google.cloud.documentai.v1.Document.text]. * @type string $type - * Required. Entity type from a schema e.g. `Address`. + * Required. Entity type from a schema, for example, `Address`. * @type string $mention_text - * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`. + * Optional. Text value of the entity, for example, `1600 Amphitheatre + * Pkwy`. * @type string $mention_id * Optional. Deprecated. Use `id` field instead. * @type float $confidence @@ -125,9 +127,9 @@ class Entity extends \Google\Protobuf\Internal\Message * for this document. * @type \Google\Cloud\DocumentAI\V1\Document\Entity\NormalizedValue $normalized_value * Optional. Normalized entity value. Absent if the extracted value could - * not be converted or the type (e.g. address) is not supported for certain - * parsers. This field is also only populated for certain supported document - * types. + * not be converted or the type (for example, address) is not supported for + * certain parsers. This field is also only populated for certain supported + * document types. * @type \Google\Cloud\DocumentAI\V1\Document\Entity[] $properties * Optional. Entities can be nested to form a hierarchical data structure * representing the content in the document. @@ -186,7 +188,7 @@ public function setTextAnchor($var) } /** - * Required. Entity type from a schema e.g. `Address`. + * Required. Entity type from a schema, for example, `Address`. * * Generated from protobuf field string type = 2 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -197,7 +199,7 @@ public function getType() } /** - * Required. Entity type from a schema e.g. `Address`. + * Required. Entity type from a schema, for example, `Address`. * * Generated from protobuf field string type = 2 [(.google.api.field_behavior) = REQUIRED]; * @param string $var @@ -212,7 +214,8 @@ public function setType($var) } /** - * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`. + * Optional. Text value of the entity, for example, `1600 Amphitheatre + * Pkwy`. * * Generated from protobuf field string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return string @@ -223,7 +226,8 @@ public function getMentionText() } /** - * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`. + * Optional. Text value of the entity, for example, `1600 Amphitheatre + * Pkwy`. * * Generated from protobuf field string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var @@ -357,9 +361,9 @@ public function setId($var) /** * Optional. Normalized entity value. Absent if the extracted value could - * not be converted or the type (e.g. address) is not supported for certain - * parsers. This field is also only populated for certain supported document - * types. + * not be converted or the type (for example, address) is not supported for + * certain parsers. This field is also only populated for certain supported + * document types. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Entity.NormalizedValue normalized_value = 9 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Cloud\DocumentAI\V1\Document\Entity\NormalizedValue|null @@ -381,9 +385,9 @@ public function clearNormalizedValue() /** * Optional. Normalized entity value. Absent if the extracted value could - * not be converted or the type (e.g. address) is not supported for certain - * parsers. This field is also only populated for certain supported document - * types. + * not be converted or the type (for example, address) is not supported for + * certain parsers. This field is also only populated for certain supported + * document types. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Entity.NormalizedValue normalized_value = 9 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\DocumentAI\V1\Document\Entity\NormalizedValue $var diff --git a/DocumentAi/src/V1/Document/Entity/NormalizedValue.php b/DocumentAi/src/V1/Document/Entity/NormalizedValue.php index daf84adf42ef..cd09e678f3d2 100644 --- a/DocumentAi/src/V1/Document/Entity/NormalizedValue.php +++ b/DocumentAi/src/V1/Document/Entity/NormalizedValue.php @@ -57,6 +57,8 @@ class NormalizedValue extends \Google\Protobuf\Internal\Message * @type float $float_value * Float value. * @type bool $signature_value + * A signature - a graphical representation of a person's name, + * often used to sign a document. * @type string $text * Optional. An optional field to store a normalized string. * For some entity types, one of respective `structured_value` fields may @@ -302,6 +304,9 @@ public function setFloatValue($var) } /** + * A signature - a graphical representation of a person's name, + * often used to sign a document. + * * Generated from protobuf field bool signature_value = 10; * @return bool */ @@ -316,6 +321,9 @@ public function hasSignatureValue() } /** + * A signature - a graphical representation of a person's name, + * often used to sign a document. + * * Generated from protobuf field bool signature_value = 10; * @param bool $var * @return $this diff --git a/DocumentAi/src/V1/Document/Page.php b/DocumentAi/src/V1/Document/Page.php index 4e7e0a78bef9..37a47edf43a9 100644 --- a/DocumentAi/src/V1/Document/Page.php +++ b/DocumentAi/src/V1/Document/Page.php @@ -87,7 +87,7 @@ class Page extends \Google\Protobuf\Internal\Message */ private $tokens; /** - * A list of detected non-text visual elements e.g. checkbox, + * A list of detected non-text visual elements, for example, checkbox, * signature etc. on the page. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.VisualElement visual_elements = 9; @@ -169,7 +169,7 @@ class Page extends \Google\Protobuf\Internal\Message * @type \Google\Cloud\DocumentAI\V1\Document\Page\Token[] $tokens * A list of visually detected tokens on the page. * @type \Google\Cloud\DocumentAI\V1\Document\Page\VisualElement[] $visual_elements - * A list of detected non-text visual elements e.g. checkbox, + * A list of detected non-text visual elements, for example, checkbox, * signature etc. on the page. * @type \Google\Cloud\DocumentAI\V1\Document\Page\Table[] $tables * A list of visually detected tables on the page. @@ -503,7 +503,7 @@ public function setTokens($var) } /** - * A list of detected non-text visual elements e.g. checkbox, + * A list of detected non-text visual elements, for example, checkbox, * signature etc. on the page. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.VisualElement visual_elements = 9; @@ -515,7 +515,7 @@ public function getVisualElements() } /** - * A list of detected non-text visual elements e.g. checkbox, + * A list of detected non-text visual elements, for example, checkbox, * signature etc. on the page. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.VisualElement visual_elements = 9; diff --git a/DocumentAi/src/V1/Document/Page/FormField.php b/DocumentAi/src/V1/Document/Page/FormField.php index e42a49774992..4f52cc2af82b 100644 --- a/DocumentAi/src/V1/Document/Page/FormField.php +++ b/DocumentAi/src/V1/Document/Page/FormField.php @@ -18,7 +18,7 @@ class FormField extends \Google\Protobuf\Internal\Message /** * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. - * e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. + * For example, `Address`, `Email`, `Grand total`, `Phone number`, etc. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout field_name = 1; */ @@ -84,7 +84,7 @@ class FormField extends \Google\Protobuf\Internal\Message * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $field_name * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. - * e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. + * For example, `Address`, `Email`, `Grand total`, `Phone number`, etc. * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $field_value * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the * [FormField][google.cloud.documentai.v1.Document.Page.FormField] value. @@ -118,7 +118,7 @@ public function __construct($data = NULL) { /** * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. - * e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. + * For example, `Address`, `Email`, `Grand total`, `Phone number`, etc. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout field_name = 1; * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null @@ -141,7 +141,7 @@ public function clearFieldName() /** * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. - * e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. + * For example, `Address`, `Email`, `Grand total`, `Phone number`, etc. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout field_name = 1; * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var diff --git a/DocumentAi/src/V1/Document/Page/Layout.php b/DocumentAi/src/V1/Document/Page/Layout.php index 00cafd168829..ad78411be810 100644 --- a/DocumentAi/src/V1/Document/Page/Layout.php +++ b/DocumentAi/src/V1/Document/Page/Layout.php @@ -25,9 +25,9 @@ class Layout extends \Google\Protobuf\Internal\Message /** * Confidence of the current * [Layout][google.cloud.documentai.v1.Document.Page.Layout] within - * context of the object this layout is for. e.g. confidence can be for a - * single token, a table, a visual element, etc. depending on context. - * Range `[0, 1]`. + * context of the object this layout is for. For example, confidence can + * be for a single token, a table, a visual element, etc. depending on + * context. Range `[0, 1]`. * * Generated from protobuf field float confidence = 2; */ @@ -59,9 +59,9 @@ class Layout extends \Google\Protobuf\Internal\Message * @type float $confidence * Confidence of the current * [Layout][google.cloud.documentai.v1.Document.Page.Layout] within - * context of the object this layout is for. e.g. confidence can be for a - * single token, a table, a visual element, etc. depending on context. - * Range `[0, 1]`. + * context of the object this layout is for. For example, confidence can + * be for a single token, a table, a visual element, etc. depending on + * context. Range `[0, 1]`. * @type \Google\Cloud\DocumentAI\V1\BoundingPoly $bounding_poly * The bounding polygon for the * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. @@ -116,9 +116,9 @@ public function setTextAnchor($var) /** * Confidence of the current * [Layout][google.cloud.documentai.v1.Document.Page.Layout] within - * context of the object this layout is for. e.g. confidence can be for a - * single token, a table, a visual element, etc. depending on context. - * Range `[0, 1]`. + * context of the object this layout is for. For example, confidence can + * be for a single token, a table, a visual element, etc. depending on + * context. Range `[0, 1]`. * * Generated from protobuf field float confidence = 2; * @return float @@ -131,9 +131,9 @@ public function getConfidence() /** * Confidence of the current * [Layout][google.cloud.documentai.v1.Document.Page.Layout] within - * context of the object this layout is for. e.g. confidence can be for a - * single token, a table, a visual element, etc. depending on context. - * Range `[0, 1]`. + * context of the object this layout is for. For example, confidence can + * be for a single token, a table, a visual element, etc. depending on + * context. Range `[0, 1]`. * * Generated from protobuf field float confidence = 2; * @param float $var diff --git a/DocumentAi/src/V1/Document/Page/VisualElement.php b/DocumentAi/src/V1/Document/Page/VisualElement.php index a5e46c248ba4..ead412d26c3a 100644 --- a/DocumentAi/src/V1/Document/Page/VisualElement.php +++ b/DocumentAi/src/V1/Document/Page/VisualElement.php @@ -9,8 +9,8 @@ use Google\Protobuf\RepeatedField; /** - * Detected non-text visual elements e.g. checkbox, signature etc. on the - * page. + * Detected non-text visual elements, for example, checkbox, signature etc. + * on the page. * * Generated from protobuf message google.cloud.documentai.v1.Document.Page.VisualElement */ diff --git a/DocumentAi/src/V1/Document/Revision/HumanReview.php b/DocumentAi/src/V1/Document/Revision/HumanReview.php index 13c139c52393..5db9c95244cf 100644 --- a/DocumentAi/src/V1/Document/Revision/HumanReview.php +++ b/DocumentAi/src/V1/Document/Revision/HumanReview.php @@ -16,7 +16,7 @@ class HumanReview extends \Google\Protobuf\Internal\Message { /** - * Human review state. e.g. `requested`, `succeeded`, `rejected`. + * Human review state. For example, `requested`, `succeeded`, `rejected`. * * Generated from protobuf field string state = 1; */ @@ -36,7 +36,7 @@ class HumanReview extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $state - * Human review state. e.g. `requested`, `succeeded`, `rejected`. + * Human review state. For example, `requested`, `succeeded`, `rejected`. * @type string $state_message * A message providing more details about the current state of processing. * For example, the rejection reason when the state is `rejected`. @@ -48,7 +48,7 @@ public function __construct($data = NULL) { } /** - * Human review state. e.g. `requested`, `succeeded`, `rejected`. + * Human review state. For example, `requested`, `succeeded`, `rejected`. * * Generated from protobuf field string state = 1; * @return string @@ -59,7 +59,7 @@ public function getState() } /** - * Human review state. e.g. `requested`, `succeeded`, `rejected`. + * Human review state. For example, `requested`, `succeeded`, `rejected`. * * Generated from protobuf field string state = 1; * @param string $var diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Barcode.php b/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Barcode.php deleted file mode 100644 index 0d7071556e0c..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Barcode.php +++ /dev/null @@ -1,24 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xDF\x02\x0A(google/cloud/documentai/v1/barcode.proto\x12\x1Agoogle.cloud.documentai.v1\"B\x0A\x07Barcode\x12\x0E\x0A\x06format\x18\x01 \x01(\x09\x12\x14\x0A\x0Cvalue_format\x18\x02 \x01(\x09\x12\x11\x0A\x09raw_value\x18\x03 \x01(\x09B\xCA\x01\x0A\x1Ecom.google.cloud.documentai.v1B\x0CBarcodeProtoP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xAA\x02\x1AGoogle.Cloud.DocumentAI.V1\xCA\x02\x1AGoogle\\Cloud\\DocumentAI\\V1\xEA\x02\x1DGoogle::Cloud::DocumentAI::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Document.php b/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Document.php deleted file mode 100644 index 9ba73c628c19..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Document.php +++ /dev/null @@ -1,35 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xEEp\x0A)google/cloud/documentai/v1/document.proto\x12\x1Agoogle.cloud.documentai.v1\x1A\x19google/api/resource.proto\x1A(google/cloud/documentai/v1/barcode.proto\x1A)google/cloud/documentai/v1/geometry.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x17google/rpc/status.proto\x1A\x17google/type/color.proto\x1A\x16google/type/date.proto\x1A\x1Agoogle/type/datetime.proto\x1A\x17google/type/money.proto\x1A google/type/postal_address.proto\"\x9Cl\x0A\x08Document\x12\x12\x0A\x03uri\x18\x01 \x01(\x09B\x03\xE0A\x01H\x00\x12\x16\x0A\x07content\x18\x02 \x01(\x0CB\x03\xE0A\x01H\x00\x12\x12\x0A\x05docid\x18\x0F \x01(\x09B\x03\xE0A\x01\x12\x11\x0A\x09mime_type\x18\x03 \x01(\x09\x12\x11\x0A\x04text\x18\x04 \x01(\x09B\x03\xE0A\x01\x12C\x0A\x0Btext_styles\x18\x05 \x03(\x0B2*.google.cloud.documentai.v1.Document.StyleB\x02\x18\x01\x128\x0A\x05pages\x18\x06 \x03(\x0B2).google.cloud.documentai.v1.Document.Page\x12=\x0A\x08entities\x18\x07 \x03(\x0B2+.google.cloud.documentai.v1.Document.Entity\x12M\x0A\x10entity_relations\x18\x08 \x03(\x0B23.google.cloud.documentai.v1.Document.EntityRelation\x12E\x0A\x0Ctext_changes\x18\x0E \x03(\x0B2/.google.cloud.documentai.v1.Document.TextChange\x12B\x0A\x0Ashard_info\x18\x09 \x01(\x0B2..google.cloud.documentai.v1.Document.ShardInfo\x12!\x0A\x05error\x18\x0A \x01(\x0B2\x12.google.rpc.Status\x12@\x0A\x09revisions\x18\x0D \x03(\x0B2-.google.cloud.documentai.v1.Document.Revision\x12L\x0A\x0Fdocument_layout\x18\x11 \x01(\x0B23.google.cloud.documentai.v1.Document.DocumentLayout\x12N\x0A\x10chunked_document\x18\x12 \x01(\x0B24.google.cloud.documentai.v1.Document.ChunkedDocument\x12H\x0A\x0Bblob_assets\x18\x13 \x03(\x0B2..google.cloud.documentai.v1.Document.BlobAssetB\x03\xE0A\x01\x12]\x0A\x18entity_validation_output\x18\x15 \x01(\x0B2;.google.cloud.documentai.v1.Document.EntityValidationOutput\x12Q\x0A\x12entities_revisions\x18\x16 \x03(\x0B25.google.cloud.documentai.v1.Document.EntitiesRevision\x12\x1C\x0A\x14entities_revision_id\x18\x17 \x01(\x09\x1AJ\x0A\x09ShardInfo\x12\x13\x0A\x0Bshard_index\x18\x01 \x01(\x03\x12\x13\x0A\x0Bshard_count\x18\x02 \x01(\x03\x12\x13\x0A\x0Btext_offset\x18\x03 \x01(\x03\x1A\xE5\x02\x0A\x05Style\x12D\x0A\x0Btext_anchor\x18\x01 \x01(\x0B2/.google.cloud.documentai.v1.Document.TextAnchor\x12!\x0A\x05color\x18\x02 \x01(\x0B2\x12.google.type.Color\x12,\x0A\x10background_color\x18\x03 \x01(\x0B2\x12.google.type.Color\x12\x13\x0A\x0Bfont_weight\x18\x04 \x01(\x09\x12\x12\x0A\x0Atext_style\x18\x05 \x01(\x09\x12\x17\x0A\x0Ftext_decoration\x18\x06 \x01(\x09\x12F\x0A\x09font_size\x18\x07 \x01(\x0B23.google.cloud.documentai.v1.Document.Style.FontSize\x12\x13\x0A\x0Bfont_family\x18\x08 \x01(\x09\x1A&\x0A\x08FontSize\x12\x0C\x0A\x04size\x18\x01 \x01(\x02\x12\x0C\x0A\x04unit\x18\x02 \x01(\x09\x1A\xC2)\x0A\x04Page\x12\x13\x0A\x0Bpage_number\x18\x01 \x01(\x05\x12>\x0A\x05image\x18\x0D \x01(\x0B2/.google.cloud.documentai.v1.Document.Page.Image\x12D\x0A\x0Atransforms\x18\x0E \x03(\x0B20.google.cloud.documentai.v1.Document.Page.Matrix\x12F\x0A\x09dimension\x18\x02 \x01(\x0B23.google.cloud.documentai.v1.Document.Page.Dimension\x12@\x0A\x06layout\x18\x03 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12V\x0A\x12detected_languages\x18\x04 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12?\x0A\x06blocks\x18\x05 \x03(\x0B2/.google.cloud.documentai.v1.Document.Page.Block\x12G\x0A\x0Aparagraphs\x18\x06 \x03(\x0B23.google.cloud.documentai.v1.Document.Page.Paragraph\x12=\x0A\x05lines\x18\x07 \x03(\x0B2..google.cloud.documentai.v1.Document.Page.Line\x12?\x0A\x06tokens\x18\x08 \x03(\x0B2/.google.cloud.documentai.v1.Document.Page.Token\x12P\x0A\x0Fvisual_elements\x18\x09 \x03(\x0B27.google.cloud.documentai.v1.Document.Page.VisualElement\x12?\x0A\x06tables\x18\x0A \x03(\x0B2/.google.cloud.documentai.v1.Document.Page.Table\x12H\x0A\x0Bform_fields\x18\x0B \x03(\x0B23.google.cloud.documentai.v1.Document.Page.FormField\x12A\x0A\x07symbols\x18\x0C \x03(\x0B20.google.cloud.documentai.v1.Document.Page.Symbol\x12T\x0A\x11detected_barcodes\x18\x0F \x03(\x0B29.google.cloud.documentai.v1.Document.Page.DetectedBarcode\x12Z\x0A\x14image_quality_scores\x18\x11 \x01(\x0B2<.google.cloud.documentai.v1.Document.Page.ImageQualityScores\x12G\x0A\x0Aprovenance\x18\x10 \x01(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1A8\x0A\x09Dimension\x12\x0D\x0A\x05width\x18\x01 \x01(\x02\x12\x0E\x0A\x06height\x18\x02 \x01(\x02\x12\x0C\x0A\x04unit\x18\x03 \x01(\x09\x1AJ\x0A\x05Image\x12\x0F\x0A\x07content\x18\x01 \x01(\x0C\x12\x11\x0A\x09mime_type\x18\x02 \x01(\x09\x12\x0D\x0A\x05width\x18\x03 \x01(\x05\x12\x0E\x0A\x06height\x18\x04 \x01(\x05\x1A@\x0A\x06Matrix\x12\x0C\x0A\x04rows\x18\x01 \x01(\x05\x12\x0C\x0A\x04cols\x18\x02 \x01(\x05\x12\x0C\x0A\x04type\x18\x03 \x01(\x05\x12\x0C\x0A\x04data\x18\x04 \x01(\x0C\x1A\xDD\x02\x0A\x06Layout\x12D\x0A\x0Btext_anchor\x18\x01 \x01(\x0B2/.google.cloud.documentai.v1.Document.TextAnchor\x12\x12\x0A\x0Aconfidence\x18\x02 \x01(\x02\x12?\x0A\x0Dbounding_poly\x18\x03 \x01(\x0B2(.google.cloud.documentai.v1.BoundingPoly\x12Q\x0A\x0Borientation\x18\x04 \x01(\x0E2<.google.cloud.documentai.v1.Document.Page.Layout.Orientation\"e\x0A\x0BOrientation\x12\x1B\x0A\x17ORIENTATION_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07PAGE_UP\x10\x01\x12\x0E\x0A\x0APAGE_RIGHT\x10\x02\x12\x0D\x0A\x09PAGE_DOWN\x10\x03\x12\x0D\x0A\x09PAGE_LEFT\x10\x04\x1A\xEA\x01\x0A\x05Block\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12V\x0A\x12detected_languages\x18\x02 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12G\x0A\x0Aprovenance\x18\x03 \x01(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1A\xEE\x01\x0A\x09Paragraph\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12V\x0A\x12detected_languages\x18\x02 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12G\x0A\x0Aprovenance\x18\x03 \x01(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1A\xE9\x01\x0A\x04Line\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12V\x0A\x12detected_languages\x18\x02 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12G\x0A\x0Aprovenance\x18\x03 \x01(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1A\x9E\x07\x0A\x05Token\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12U\x0A\x0Edetected_break\x18\x02 \x01(\x0B2=.google.cloud.documentai.v1.Document.Page.Token.DetectedBreak\x12V\x0A\x12detected_languages\x18\x03 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12G\x0A\x0Aprovenance\x18\x04 \x01(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x12M\x0A\x0Astyle_info\x18\x05 \x01(\x0B29.google.cloud.documentai.v1.Document.Page.Token.StyleInfo\x1A\xA6\x01\x0A\x0DDetectedBreak\x12P\x0A\x04type\x18\x01 \x01(\x0E2B.google.cloud.documentai.v1.Document.Page.Token.DetectedBreak.Type\"C\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x09\x0A\x05SPACE\x10\x01\x12\x0E\x0A\x0AWIDE_SPACE\x10\x02\x12\x0A\x0A\x06HYPHEN\x10\x03\x1A\xE2\x02\x0A\x09StyleInfo\x12\x11\x0A\x09font_size\x18\x01 \x01(\x05\x12\x17\x0A\x0Fpixel_font_size\x18\x02 \x01(\x01\x12\x16\x0A\x0Eletter_spacing\x18\x03 \x01(\x01\x12\x11\x0A\x09font_type\x18\x04 \x01(\x09\x12\x0C\x0A\x04bold\x18\x05 \x01(\x08\x12\x0E\x0A\x06italic\x18\x06 \x01(\x08\x12\x12\x0A\x0Aunderlined\x18\x07 \x01(\x08\x12\x11\x0A\x09strikeout\x18\x08 \x01(\x08\x12\x11\x0A\x09subscript\x18\x09 \x01(\x08\x12\x13\x0A\x0Bsuperscript\x18\x0A \x01(\x08\x12\x11\x0A\x09smallcaps\x18\x0B \x01(\x08\x12\x13\x0A\x0Bfont_weight\x18\x0C \x01(\x05\x12\x13\x0A\x0Bhandwritten\x18\x0D \x01(\x08\x12&\x0A\x0Atext_color\x18\x0E \x01(\x0B2\x12.google.type.Color\x12,\x0A\x10background_color\x18\x0F \x01(\x0B2\x12.google.type.Color\x1A\xA2\x01\x0A\x06Symbol\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12V\x0A\x12detected_languages\x18\x02 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x1A\xB7\x01\x0A\x0DVisualElement\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12\x0C\x0A\x04type\x18\x02 \x01(\x09\x12V\x0A\x12detected_languages\x18\x03 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x1A\xA8\x05\x0A\x05Table\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12M\x0A\x0Bheader_rows\x18\x02 \x03(\x0B28.google.cloud.documentai.v1.Document.Page.Table.TableRow\x12K\x0A\x09body_rows\x18\x03 \x03(\x0B28.google.cloud.documentai.v1.Document.Page.Table.TableRow\x12V\x0A\x12detected_languages\x18\x04 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12G\x0A\x0Aprovenance\x18\x05 \x01(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1AT\x0A\x08TableRow\x12H\x0A\x05cells\x18\x01 \x03(\x0B29.google.cloud.documentai.v1.Document.Page.Table.TableCell\x1A\xC9\x01\x0A\x09TableCell\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12\x10\x0A\x08row_span\x18\x02 \x01(\x05\x12\x10\x0A\x08col_span\x18\x03 \x01(\x05\x12V\x0A\x12detected_languages\x18\x04 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x1A\xE6\x03\x0A\x09FormField\x12D\x0A\x0Afield_name\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12E\x0A\x0Bfield_value\x18\x02 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x12[\x0A\x17name_detected_languages\x18\x03 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12\\\x0A\x18value_detected_languages\x18\x04 \x03(\x0B2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\x12\x12\x0A\x0Avalue_type\x18\x05 \x01(\x09\x12\x1A\x0A\x12corrected_key_text\x18\x06 \x01(\x09\x12\x1C\x0A\x14corrected_value_text\x18\x07 \x01(\x09\x12C\x0A\x0Aprovenance\x18\x08 \x01(\x0B2/.google.cloud.documentai.v1.Document.Provenance\x1A\x89\x01\x0A\x0FDetectedBarcode\x12@\x0A\x06layout\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Page.Layout\x124\x0A\x07barcode\x18\x02 \x01(\x0B2#.google.cloud.documentai.v1.Barcode\x1A=\x0A\x10DetectedLanguage\x12\x15\x0A\x0Dlanguage_code\x18\x01 \x01(\x09\x12\x12\x0A\x0Aconfidence\x18\x02 \x01(\x02\x1A\xC6\x01\x0A\x12ImageQualityScores\x12\x15\x0A\x0Dquality_score\x18\x01 \x01(\x02\x12e\x0A\x10detected_defects\x18\x02 \x03(\x0B2K.google.cloud.documentai.v1.Document.Page.ImageQualityScores.DetectedDefect\x1A2\x0A\x0EDetectedDefect\x12\x0C\x0A\x04type\x18\x01 \x01(\x09\x12\x12\x0A\x0Aconfidence\x18\x02 \x01(\x02\x1A\xEF\x07\x0A\x06Entity\x12I\x0A\x0Btext_anchor\x18\x01 \x01(\x0B2/.google.cloud.documentai.v1.Document.TextAnchorB\x03\xE0A\x01\x12\x11\x0A\x04type\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\x19\x0A\x0Cmention_text\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x17\x0A\x0Amention_id\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x17\x0A\x0Aconfidence\x18\x05 \x01(\x02B\x03\xE0A\x01\x12I\x0A\x0Bpage_anchor\x18\x06 \x01(\x0B2/.google.cloud.documentai.v1.Document.PageAnchorB\x03\xE0A\x01\x12\x0F\x0A\x02id\x18\x07 \x01(\x09B\x03\xE0A\x01\x12Z\x0A\x10normalized_value\x18\x09 \x01(\x0B2;.google.cloud.documentai.v1.Document.Entity.NormalizedValueB\x03\xE0A\x01\x12D\x0A\x0Aproperties\x18\x0A \x03(\x0B2+.google.cloud.documentai.v1.Document.EntityB\x03\xE0A\x01\x12H\x0A\x0Aprovenance\x18\x0B \x01(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x03\xE0A\x01\x12\x15\x0A\x08redacted\x18\x0C \x01(\x08B\x03\xE0A\x01\x12G\x0A\x06method\x18\x0F \x01(\x0E22.google.cloud.documentai.v1.Document.Entity.MethodB\x03\xE0A\x01\x1A\xD6\x02\x0A\x0FNormalizedValue\x12)\x0A\x0Bmoney_value\x18\x02 \x01(\x0B2\x12.google.type.MoneyH\x00\x12'\x0A\x0Adate_value\x18\x03 \x01(\x0B2\x11.google.type.DateH\x00\x12/\x0A\x0Edatetime_value\x18\x04 \x01(\x0B2\x15.google.type.DateTimeH\x00\x123\x0A\x0Daddress_value\x18\x05 \x01(\x0B2\x1A.google.type.PostalAddressH\x00\x12\x17\x0A\x0Dboolean_value\x18\x06 \x01(\x08H\x00\x12\x17\x0A\x0Dinteger_value\x18\x07 \x01(\x05H\x00\x12\x15\x0A\x0Bfloat_value\x18\x08 \x01(\x02H\x00\x12\x19\x0A\x0Fsignature_value\x18\x0A \x01(\x08H\x00\x12\x11\x0A\x04text\x18\x01 \x01(\x09B\x03\xE0A\x01B\x12\x0A\x10structured_value\"9\x0A\x06Method\x12\x16\x0A\x12METHOD_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07EXTRACT\x10\x01\x12\x0A\x0A\x06DERIVE\x10\x02\x1AI\x0A\x0EEntityRelation\x12\x12\x0A\x0Asubject_id\x18\x01 \x01(\x09\x12\x11\x0A\x09object_id\x18\x02 \x01(\x09\x12\x10\x0A\x08relation\x18\x03 \x01(\x09\x1A\xA8\x01\x0A\x0ATextAnchor\x12R\x0A\x0Dtext_segments\x18\x01 \x03(\x0B2;.google.cloud.documentai.v1.Document.TextAnchor.TextSegment\x12\x0F\x0A\x07content\x18\x02 \x01(\x09\x1A5\x0A\x0BTextSegment\x12\x13\x0A\x0Bstart_index\x18\x01 \x01(\x03\x12\x11\x0A\x09end_index\x18\x02 \x01(\x03\x1A\xD8\x03\x0A\x0APageAnchor\x12J\x0A\x09page_refs\x18\x01 \x03(\x0B27.google.cloud.documentai.v1.Document.PageAnchor.PageRef\x1A\xFD\x02\x0A\x07PageRef\x12\x11\x0A\x04page\x18\x01 \x01(\x03B\x03\xE0A\x02\x12\\\x0A\x0Blayout_type\x18\x02 \x01(\x0E2B.google.cloud.documentai.v1.Document.PageAnchor.PageRef.LayoutTypeB\x03\xE0A\x01\x12\x18\x0A\x09layout_id\x18\x03 \x01(\x09B\x05\x18\x01\xE0A\x01\x12D\x0A\x0Dbounding_poly\x18\x04 \x01(\x0B2(.google.cloud.documentai.v1.BoundingPolyB\x03\xE0A\x01\x12\x17\x0A\x0Aconfidence\x18\x05 \x01(\x02B\x03\xE0A\x01\"\x87\x01\x0A\x0ALayoutType\x12\x1B\x0A\x17LAYOUT_TYPE_UNSPECIFIED\x10\x00\x12\x09\x0A\x05BLOCK\x10\x01\x12\x0D\x0A\x09PARAGRAPH\x10\x02\x12\x08\x0A\x04LINE\x10\x03\x12\x09\x0A\x05TOKEN\x10\x04\x12\x12\x0A\x0EVISUAL_ELEMENT\x10\x05\x12\x09\x0A\x05TABLE\x10\x06\x12\x0E\x0A\x0AFORM_FIELD\x10\x07\x1A\xA8\x03\x0A\x0AProvenance\x12\x14\x0A\x08revision\x18\x01 \x01(\x05B\x02\x18\x01\x12\x0E\x0A\x02id\x18\x02 \x01(\x05B\x02\x18\x01\x12G\x0A\x07parents\x18\x03 \x03(\x0B26.google.cloud.documentai.v1.Document.Provenance.Parent\x12K\x0A\x04type\x18\x04 \x01(\x0E2=.google.cloud.documentai.v1.Document.Provenance.OperationType\x1A9\x0A\x06Parent\x12\x10\x0A\x08revision\x18\x01 \x01(\x05\x12\x0D\x0A\x05index\x18\x03 \x01(\x05\x12\x0E\x0A\x02id\x18\x02 \x01(\x05B\x02\x18\x01\"\xA2\x01\x0A\x0DOperationType\x12\x1E\x0A\x1AOPERATION_TYPE_UNSPECIFIED\x10\x00\x12\x07\x0A\x03ADD\x10\x01\x12\x0A\x0A\x06REMOVE\x10\x02\x12\x0A\x0A\x06UPDATE\x10\x07\x12\x0B\x0A\x07REPLACE\x10\x03\x12\x16\x0A\x0EEVAL_REQUESTED\x10\x04\x1A\x02\x08\x01\x12\x15\x0A\x0DEVAL_APPROVED\x10\x05\x1A\x02\x08\x01\x12\x14\x0A\x0CEVAL_SKIPPED\x10\x06\x1A\x02\x08\x01\x1A\xA5\x02\x0A\x08Revision\x12\x0F\x0A\x05agent\x18\x04 \x01(\x09H\x00\x12\x13\x0A\x09processor\x18\x05 \x01(\x09H\x00\x12\x0A\x0A\x02id\x18\x01 \x01(\x09\x12\x12\x0A\x06parent\x18\x02 \x03(\x05B\x02\x18\x01\x12\x12\x0A\x0Aparent_ids\x18\x07 \x03(\x09\x12/\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12O\x0A\x0Chuman_review\x18\x06 \x01(\x0B29.google.cloud.documentai.v1.Document.Revision.HumanReview\x1A3\x0A\x0BHumanReview\x12\x0D\x0A\x05state\x18\x01 \x01(\x09\x12\x15\x0A\x0Dstate_message\x18\x02 \x01(\x09B\x08\x0A\x06source\x1A\xB1\x01\x0A\x0ATextChange\x12D\x0A\x0Btext_anchor\x18\x01 \x01(\x0B2/.google.cloud.documentai.v1.Document.TextAnchor\x12\x14\x0A\x0Cchanged_text\x18\x02 \x01(\x09\x12G\x0A\x0Aprovenance\x18\x03 \x03(\x0B2/.google.cloud.documentai.v1.Document.ProvenanceB\x02\x18\x01\x1A\"\x0A\x0BAnnotations\x12\x13\x0A\x0Bdescription\x18\x01 \x01(\x09\x1A\xBE\x10\x0A\x0EDocumentLayout\x12W\x0A\x06blocks\x18\x01 \x03(\x0B2G.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock\x1A\xD2\x0F\x0A\x13DocumentLayoutBlock\x12m\x0A\x0Atext_block\x18\x02 \x01(\x0B2W.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlockH\x00\x12o\x0A\x0Btable_block\x18\x03 \x01(\x0B2X.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlockH\x00\x12m\x0A\x0Alist_block\x18\x04 \x01(\x0B2W.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlockH\x00\x12o\x0A\x0Bimage_block\x18\x07 \x01(\x0B2X.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlockH\x00\x12\x10\x0A\x08block_id\x18\x01 \x01(\x09\x12i\x0A\x09page_span\x18\x05 \x01(\x0B2V.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan\x12>\x0A\x0Cbounding_box\x18\x06 \x01(\x0B2(.google.cloud.documentai.v1.BoundingPoly\x1A6\x0A\x0ELayoutPageSpan\x12\x12\x0A\x0Apage_start\x18\x01 \x01(\x05\x12\x10\x0A\x08page_end\x18\x02 \x01(\x05\x1A\xCD\x01\x0A\x0FLayoutTextBlock\x12\x0C\x0A\x04text\x18\x01 \x01(\x09\x12\x0C\x0A\x04type\x18\x02 \x01(\x09\x12W\x0A\x06blocks\x18\x03 \x03(\x0B2G.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock\x12E\x0A\x0Bannotations\x18\x04 \x01(\x0B20.google.cloud.documentai.v1.Document.Annotations\x1A\xC2\x02\x0A\x10LayoutTableBlock\x12k\x0A\x0Bheader_rows\x18\x01 \x03(\x0B2V.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow\x12i\x0A\x09body_rows\x18\x02 \x03(\x0B2V.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow\x12\x0F\x0A\x07caption\x18\x03 \x01(\x09\x12E\x0A\x0Bannotations\x18\x04 \x01(\x0B20.google.cloud.documentai.v1.Document.Annotations\x1Ax\x0A\x0ELayoutTableRow\x12f\x0A\x05cells\x18\x01 \x03(\x0B2W.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell\x1A\x8E\x01\x0A\x0FLayoutTableCell\x12W\x0A\x06blocks\x18\x01 \x03(\x0B2G.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock\x12\x10\x0A\x08row_span\x18\x02 \x01(\x05\x12\x10\x0A\x08col_span\x18\x03 \x01(\x05\x1A\x8E\x01\x0A\x0FLayoutListBlock\x12m\x0A\x0Clist_entries\x18\x01 \x03(\x0B2W.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry\x12\x0C\x0A\x04type\x18\x02 \x01(\x09\x1Aj\x0A\x0FLayoutListEntry\x12W\x0A\x06blocks\x18\x01 \x03(\x0B2G.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock\x1A\xDF\x01\x0A\x10LayoutImageBlock\x12\x1C\x0A\x0Dblob_asset_id\x18\x04 \x01(\x09B\x03\xE0A\x01H\x00\x12\x16\x0A\x07gcs_uri\x18\x05 \x01(\x09B\x03\xE0A\x01H\x00\x12\x17\x0A\x08data_uri\x18\x06 \x01(\x09B\x03\xE0A\x01H\x00\x12\x11\x0A\x09mime_type\x18\x01 \x01(\x09\x12\x12\x0A\x0Aimage_text\x18\x02 \x01(\x09\x12E\x0A\x0Bannotations\x18\x03 \x01(\x0B20.google.cloud.documentai.v1.Document.AnnotationsB\x0E\x0A\x0Cimage_sourceB\x07\x0A\x05block\x1A\xD8\x0A\x0A\x0FChunkedDocument\x12J\x0A\x06chunks\x18\x01 \x03(\x0B2:.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk\x1A\xF8\x09\x0A\x05Chunk\x12\x10\x0A\x08chunk_id\x18\x01 \x01(\x09\x12\x18\x0A\x10source_block_ids\x18\x02 \x03(\x09\x12\x0F\x0A\x07content\x18\x03 \x01(\x09\x12[\x0A\x09page_span\x18\x04 \x01(\x0B2H.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan\x12`\x0A\x0Cpage_headers\x18\x05 \x03(\x0B2J.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader\x12`\x0A\x0Cpage_footers\x18\x06 \x03(\x0B2J.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter\x12[\x0A\x0Cchunk_fields\x18\x07 \x03(\x0B2E.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField\x1A5\x0A\x0DChunkPageSpan\x12\x12\x0A\x0Apage_start\x18\x01 \x01(\x05\x12\x10\x0A\x08page_end\x18\x02 \x01(\x05\x1A|\x0A\x0FChunkPageHeader\x12\x0C\x0A\x04text\x18\x01 \x01(\x09\x12[\x0A\x09page_span\x18\x02 \x01(\x0B2H.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan\x1A|\x0A\x0FChunkPageFooter\x12\x0C\x0A\x04text\x18\x01 \x01(\x09\x12[\x0A\x09page_span\x18\x02 \x01(\x0B2H.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan\x1A\xB7\x01\x0A\x0FImageChunkField\x12\x1C\x0A\x0Dblob_asset_id\x18\x01 \x01(\x09B\x03\xE0A\x01H\x00\x12\x16\x0A\x07gcs_uri\x18\x02 \x01(\x09B\x03\xE0A\x01H\x00\x12\x17\x0A\x08data_uri\x18\x03 \x01(\x09B\x03\xE0A\x01H\x00\x12E\x0A\x0Bannotations\x18\x04 \x01(\x0B20.google.cloud.documentai.v1.Document.AnnotationsB\x0E\x0A\x0Cimage_source\x1AX\x0A\x0FTableChunkField\x12E\x0A\x0Bannotations\x18\x01 \x01(\x0B20.google.cloud.documentai.v1.Document.Annotations\x1A\xEC\x01\x0A\x0AChunkField\x12g\x0A\x11image_chunk_field\x18\x01 \x01(\x0B2J.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkFieldH\x00\x12g\x0A\x11table_chunk_field\x18\x02 \x01(\x0B2J.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkFieldH\x00B\x0C\x0A\x0Afield_type\x1AK\x0A\x09BlobAsset\x12\x15\x0A\x08asset_id\x18\x01 \x01(\x09B\x03\xE0A\x01\x12\x14\x0A\x07content\x18\x02 \x01(\x0CB\x03\xE0A\x01\x12\x11\x0A\x09mime_type\x18\x03 \x01(\x09\x1A\xD2\x04\x0A\x16EntityValidationOutput\x12h\x0A\x12validation_results\x18\x01 \x03(\x0B2L.google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult\x12\x16\x0A\x0Epass_all_rules\x18\x02 \x01(\x08\x1A\xB5\x03\x0A\x10ValidationResult\x12\x11\x0A\x09rule_name\x18\x01 \x01(\x09\x12\x18\x0A\x10rule_description\x18\x02 \x01(\x09\x12\x81\x01\x0A\x16validation_result_type\x18\x03 \x01(\x0E2a.google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult.ValidationResultType\x12\x1A\x0A\x12validation_details\x18\x04 \x01(\x09\"\xD3\x01\x0A\x14ValidationResultType\x12&\x0A\"VALIDATION_RESULT_TYPE_UNSPECIFIED\x10\x00\x12 \x0A\x1CVALIDATION_RESULT_TYPE_VALID\x10\x01\x12\"\x0A\x1EVALIDATION_RESULT_TYPE_INVALID\x10\x02\x12\"\x0A\x1EVALIDATION_RESULT_TYPE_SKIPPED\x10\x03\x12)\x0A%VALIDATION_RESULT_TYPE_NOT_APPLICABLE\x10\x04\x1A\xC5\x01\x0A\x10EntitiesRevision\x12\x13\x0A\x0Brevision_id\x18\x01 \x01(\x09\x12=\x0A\x08entities\x18\x02 \x03(\x0B2+.google.cloud.documentai.v1.Document.Entity\x12]\x0A\x18entity_validation_output\x18\x03 \x01(\x0B2;.google.cloud.documentai.v1.Document.EntityValidationOutputB\x08\x0A\x06sourceB\xCB\x01\x0A\x1Ecom.google.cloud.documentai.v1B\x0DDocumentProtoP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xAA\x02\x1AGoogle.Cloud.DocumentAI.V1\xCA\x02\x1AGoogle\\Cloud\\DocumentAI\\V1\xEA\x02\x1DGoogle::Cloud::DocumentAI::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/DocumentIo.php b/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/DocumentIo.php deleted file mode 100644 index e010f4387ccf..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/DocumentIo.php +++ /dev/null @@ -1,25 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xB4\x0C\x0A,google/cloud/documentai/v1/document_io.proto\x12\x1Agoogle.cloud.documentai.v1\"G\x0A\x0BRawDocument\x12\x0F\x0A\x07content\x18\x01 \x01(\x0C\x12\x11\x0A\x09mime_type\x18\x02 \x01(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x03 \x01(\x09\"1\x0A\x0BGcsDocument\x12\x0F\x0A\x07gcs_uri\x18\x01 \x01(\x09\x12\x11\x0A\x09mime_type\x18\x02 \x01(\x09\"J\x0A\x0CGcsDocuments\x12:\x0A\x09documents\x18\x01 \x03(\x0B2'.google.cloud.documentai.v1.GcsDocument\"#\x0A\x09GcsPrefix\x12\x16\x0A\x0Egcs_uri_prefix\x18\x01 \x01(\x09\"\xA5\x01\x0A\x19BatchDocumentsInputConfig\x12;\x0A\x0Agcs_prefix\x18\x01 \x01(\x0B2%.google.cloud.documentai.v1.GcsPrefixH\x00\x12A\x0A\x0Dgcs_documents\x18\x02 \x01(\x0B2(.google.cloud.documentai.v1.GcsDocumentsH\x00B\x08\x0A\x06source\"\x85\x03\x0A\x14DocumentOutputConfig\x12]\x0A\x11gcs_output_config\x18\x01 \x01(\x0B2@.google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfigH\x00\x1A\xFE\x01\x0A\x0FGcsOutputConfig\x12\x0F\x0A\x07gcs_uri\x18\x01 \x01(\x09\x12.\x0A\x0Afield_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\x12h\x0A\x0Fsharding_config\x18\x03 \x01(\x0B2O.google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.ShardingConfig\x1A@\x0A\x0EShardingConfig\x12\x17\x0A\x0Fpages_per_shard\x18\x01 \x01(\x05\x12\x15\x0A\x0Dpages_overlap\x18\x02 \x01(\x05B\x0D\x0A\x0Bdestination\"\xF2\x03\x0A\x09OcrConfig\x12:\x0A\x05hints\x18\x02 \x01(\x0B2+.google.cloud.documentai.v1.OcrConfig.Hints\x12!\x0A\x19enable_native_pdf_parsing\x18\x03 \x01(\x08\x12#\x0A\x1Benable_image_quality_scores\x18\x04 \x01(\x08\x12\x1C\x0A\x14advanced_ocr_options\x18\x05 \x03(\x09\x12\x15\x0A\x0Denable_symbol\x18\x06 \x01(\x08\x12\x1E\x0A\x12compute_style_info\x18\x08 \x01(\x08B\x02\x18\x01\x12)\x0A!disable_character_boxes_detection\x18\x0A \x01(\x08\x12O\x0A\x10premium_features\x18\x0B \x01(\x0B25.google.cloud.documentai.v1.OcrConfig.PremiumFeatures\x1A\x1F\x0A\x05Hints\x12\x16\x0A\x0Elanguage_hints\x18\x01 \x03(\x09\x1Ao\x0A\x0FPremiumFeatures\x12'\x0A\x1Fenable_selection_mark_detection\x18\x03 \x01(\x08\x12\x1A\x0A\x12compute_style_info\x18\x04 \x01(\x08\x12\x17\x0A\x0Fenable_math_ocr\x18\x05 \x01(\x08B\xCD\x01\x0A\x1Ecom.google.cloud.documentai.v1B\x0FDocumentIoProtoP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xAA\x02\x1AGoogle.Cloud.DocumentAI.V1\xCA\x02\x1AGoogle\\Cloud\\DocumentAI\\V1\xEA\x02\x1DGoogle::Cloud::DocumentAI::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/DocumentProcessorService.php b/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/DocumentProcessorService.php deleted file mode 100644 index b9a0ccf98cc7..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/DocumentProcessorService.php +++ /dev/null @@ -1,40 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xF2y\x0A;google/cloud/documentai/v1/document_processor_service.proto\x12\x1Agoogle.cloud.documentai.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A)google/cloud/documentai/v1/document.proto\x1A,google/cloud/documentai/v1/document_io.proto\x1A0google/cloud/documentai/v1/document_schema.proto\x1A+google/cloud/documentai/v1/evaluation.proto\x1A3google/cloud/documentai/v1/operation_metadata.proto\x1A*google/cloud/documentai/v1/processor.proto\x1A/google/cloud/documentai/v1/processor_type.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x17google/rpc/status.proto\"\x8D\x06\x0A\x0EProcessOptions\x12e\x0A\x18individual_page_selector\x18\x05 \x01(\x0B2A.google.cloud.documentai.v1.ProcessOptions.IndividualPageSelectorH\x00\x12\x14\x0A\x0Afrom_start\x18\x06 \x01(\x05H\x00\x12\x12\x0A\x08from_end\x18\x07 \x01(\x05H\x00\x129\x0A\x0Aocr_config\x18\x01 \x01(\x0B2%.google.cloud.documentai.v1.OcrConfig\x12S\x0A\x0Dlayout_config\x18\x09 \x01(\x0B27.google.cloud.documentai.v1.ProcessOptions.LayoutConfigB\x03\xE0A\x01\x12H\x0A\x0Fschema_override\x18\x08 \x01(\x0B2*.google.cloud.documentai.v1.DocumentSchemaB\x03\xE0A\x01\x1A\xD3\x02\x0A\x0CLayoutConfig\x12d\x0A\x0Fchunking_config\x18\x01 \x01(\x0B2F.google.cloud.documentai.v1.ProcessOptions.LayoutConfig.ChunkingConfigB\x03\xE0A\x01\x12\x1A\x0A\x0Dreturn_images\x18\x02 \x01(\x08B\x03\xE0A\x01\x12\"\x0A\x15return_bounding_boxes\x18\x03 \x01(\x08B\x03\xE0A\x01\x12\$\x0A\x17enable_image_annotation\x18\x04 \x01(\x08B\x03\xE0A\x01\x12\$\x0A\x17enable_table_annotation\x18\x06 \x01(\x08B\x03\xE0A\x01\x1AQ\x0A\x0EChunkingConfig\x12\x17\x0A\x0Achunk_size\x18\x01 \x01(\x05B\x03\xE0A\x01\x12&\x0A\x19include_ancestor_headings\x18\x02 \x01(\x08B\x03\xE0A\x01\x1A,\x0A\x16IndividualPageSelector\x12\x12\x0A\x05pages\x18\x01 \x03(\x05B\x03\xE0A\x01B\x0C\x0A\x0Apage_range\"\x9F\x04\x0A\x0EProcessRequest\x12?\x0A\x0Finline_document\x18\x04 \x01(\x0B2\$.google.cloud.documentai.v1.DocumentH\x00\x12?\x0A\x0Craw_document\x18\x05 \x01(\x0B2'.google.cloud.documentai.v1.RawDocumentH\x00\x12?\x0A\x0Cgcs_document\x18\x08 \x01(\x0B2'.google.cloud.documentai.v1.GcsDocumentH\x00\x12\x17\x0A\x04name\x18\x01 \x01(\x09B\x09\xE0A\x02\xFAA\x03\x0A\x01*\x12\x19\x0A\x11skip_human_review\x18\x03 \x01(\x08\x12.\x0A\x0Afield_mask\x18\x06 \x01(\x0B2\x1A.google.protobuf.FieldMask\x12C\x0A\x0Fprocess_options\x18\x07 \x01(\x0B2*.google.cloud.documentai.v1.ProcessOptions\x12K\x0A\x06labels\x18\x0A \x03(\x0B26.google.cloud.documentai.v1.ProcessRequest.LabelsEntryB\x03\xE0A\x01\x12\x1B\x0A\x0Eimageless_mode\x18\x0B \x01(\x08B\x03\xE0A\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01B\x08\x0A\x06source\"\xEE\x01\x0A\x11HumanReviewStatus\x12B\x0A\x05state\x18\x01 \x01(\x0E23.google.cloud.documentai.v1.HumanReviewStatus.State\x12\x15\x0A\x0Dstate_message\x18\x02 \x01(\x09\x12\x1E\x0A\x16human_review_operation\x18\x03 \x01(\x09\"^\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07SKIPPED\x10\x01\x12\x15\x0A\x11VALIDATION_PASSED\x10\x02\x12\x0F\x0A\x0BIN_PROGRESS\x10\x03\x12\x09\x0A\x05ERROR\x10\x04\"\x95\x01\x0A\x0FProcessResponse\x126\x0A\x08document\x18\x01 \x01(\x0B2\$.google.cloud.documentai.v1.Document\x12J\x0A\x13human_review_status\x18\x03 \x01(\x0B2-.google.cloud.documentai.v1.HumanReviewStatus\"\xB1\x03\x0A\x13BatchProcessRequest\x12\x17\x0A\x04name\x18\x01 \x01(\x09B\x09\xE0A\x02\xFAA\x03\x0A\x01*\x12N\x0A\x0Finput_documents\x18\x05 \x01(\x0B25.google.cloud.documentai.v1.BatchDocumentsInputConfig\x12P\x0A\x16document_output_config\x18\x06 \x01(\x0B20.google.cloud.documentai.v1.DocumentOutputConfig\x12\x19\x0A\x11skip_human_review\x18\x04 \x01(\x08\x12C\x0A\x0Fprocess_options\x18\x07 \x01(\x0B2*.google.cloud.documentai.v1.ProcessOptions\x12P\x0A\x06labels\x18\x09 \x03(\x0B2;.google.cloud.documentai.v1.BatchProcessRequest.LabelsEntryB\x03\xE0A\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\x16\x0A\x14BatchProcessResponse\"\xFF\x04\x0A\x14BatchProcessMetadata\x12E\x0A\x05state\x18\x01 \x01(\x0E26.google.cloud.documentai.v1.BatchProcessMetadata.State\x12\x15\x0A\x0Dstate_message\x18\x02 \x01(\x09\x12/\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12/\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12m\x0A\x1Bindividual_process_statuses\x18\x05 \x03(\x0B2H.google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus\x1A\xC3\x01\x0A\x17IndividualProcessStatus\x12\x18\x0A\x10input_gcs_source\x18\x01 \x01(\x09\x12\"\x0A\x06status\x18\x02 \x01(\x0B2\x12.google.rpc.Status\x12\x1E\x0A\x16output_gcs_destination\x18\x03 \x01(\x09\x12J\x0A\x13human_review_status\x18\x05 \x01(\x0B2-.google.cloud.documentai.v1.HumanReviewStatus\"r\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07WAITING\x10\x01\x12\x0B\x0A\x07RUNNING\x10\x02\x12\x0D\x0A\x09SUCCEEDED\x10\x03\x12\x0E\x0A\x0ACANCELLING\x10\x04\x12\x0D\x0A\x09CANCELLED\x10\x05\x12\x0A\x0A\x06FAILED\x10\x06\"]\x0A\x1AFetchProcessorTypesRequest\x12?\x0A\x06parent\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x12'documentai.googleapis.com/ProcessorType\"a\x0A\x1BFetchProcessorTypesResponse\x12B\x0A\x0Fprocessor_types\x18\x01 \x03(\x0B2).google.cloud.documentai.v1.ProcessorType\"\x83\x01\x0A\x19ListProcessorTypesRequest\x12?\x0A\x06parent\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x12'documentai.googleapis.com/ProcessorType\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"y\x0A\x1AListProcessorTypesResponse\x12B\x0A\x0Fprocessor_types\x18\x01 \x03(\x0B2).google.cloud.documentai.v1.ProcessorType\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"{\x0A\x15ListProcessorsRequest\x12;\x0A\x06parent\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x12#documentai.googleapis.com/Processor\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"l\x0A\x16ListProcessorsResponse\x129\x0A\x0Aprocessors\x18\x01 \x03(\x0B2%.google.cloud.documentai.v1.Processor\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"X\x0A\x17GetProcessorTypeRequest\x12=\x0A\x04name\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x0A'documentai.googleapis.com/ProcessorType\"P\x0A\x13GetProcessorRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#documentai.googleapis.com/Processor\"^\x0A\x1AGetProcessorVersionRequest\x12@\x0A\x04name\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x0A*documentai.googleapis.com/ProcessorVersion\"\x89\x01\x0A\x1CListProcessorVersionsRequest\x12B\x0A\x06parent\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x12*documentai.googleapis.com/ProcessorVersion\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\x82\x01\x0A\x1DListProcessorVersionsResponse\x12H\x0A\x12processor_versions\x18\x01 \x03(\x0B2,.google.cloud.documentai.v1.ProcessorVersion\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"a\x0A\x1DDeleteProcessorVersionRequest\x12@\x0A\x04name\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x0A*documentai.googleapis.com/ProcessorVersion\"n\x0A\x1EDeleteProcessorVersionMetadata\x12L\x0A\x0Fcommon_metadata\x18\x01 \x01(\x0B23.google.cloud.documentai.v1.CommonOperationMetadata\"a\x0A\x1DDeployProcessorVersionRequest\x12@\x0A\x04name\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x0A*documentai.googleapis.com/ProcessorVersion\" \x0A\x1EDeployProcessorVersionResponse\"n\x0A\x1EDeployProcessorVersionMetadata\x12L\x0A\x0Fcommon_metadata\x18\x01 \x01(\x0B23.google.cloud.documentai.v1.CommonOperationMetadata\"c\x0A\x1FUndeployProcessorVersionRequest\x12@\x0A\x04name\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x0A*documentai.googleapis.com/ProcessorVersion\"\"\x0A UndeployProcessorVersionResponse\"p\x0A UndeployProcessorVersionMetadata\x12L\x0A\x0Fcommon_metadata\x18\x01 \x01(\x0B23.google.cloud.documentai.v1.CommonOperationMetadata\"\x94\x01\x0A\x16CreateProcessorRequest\x12;\x0A\x06parent\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x12#documentai.googleapis.com/Processor\x12=\x0A\x09processor\x18\x02 \x01(\x0B2%.google.cloud.documentai.v1.ProcessorB\x03\xE0A\x02\"S\x0A\x16DeleteProcessorRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#documentai.googleapis.com/Processor\"g\x0A\x17DeleteProcessorMetadata\x12L\x0A\x0Fcommon_metadata\x18\x05 \x01(\x0B23.google.cloud.documentai.v1.CommonOperationMetadata\"S\x0A\x16EnableProcessorRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#documentai.googleapis.com/Processor\"\x19\x0A\x17EnableProcessorResponse\"g\x0A\x17EnableProcessorMetadata\x12L\x0A\x0Fcommon_metadata\x18\x05 \x01(\x0B23.google.cloud.documentai.v1.CommonOperationMetadata\"T\x0A\x17DisableProcessorRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#documentai.googleapis.com/Processor\"\x1A\x0A\x18DisableProcessorResponse\"h\x0A\x18DisableProcessorMetadata\x12L\x0A\x0Fcommon_metadata\x18\x05 \x01(\x0B23.google.cloud.documentai.v1.CommonOperationMetadata\"\xBA\x01\x0A!SetDefaultProcessorVersionRequest\x12>\x0A\x09processor\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#documentai.googleapis.com/Processor\x12U\x0A\x19default_processor_version\x18\x02 \x01(\x09B2\xE0A\x02\xFAA,\x0A*documentai.googleapis.com/ProcessorVersion\"\$\x0A\"SetDefaultProcessorVersionResponse\"r\x0A\"SetDefaultProcessorVersionMetadata\x12L\x0A\x0Fcommon_metadata\x18\x01 \x01(\x0B23.google.cloud.documentai.v1.CommonOperationMetadata\"\xA9\x09\x0A\x1CTrainProcessorVersionRequest\x12\x86\x01\x0A\"custom_document_extraction_options\x18\x05 \x01(\x0B2X.google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptionsH\x00\x12\x80\x01\x0A\x1Ffoundation_model_tuning_options\x18\x0C \x01(\x0B2U.google.cloud.documentai.v1.TrainProcessorVersionRequest.FoundationModelTuningOptionsH\x00\x12;\x0A\x06parent\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#documentai.googleapis.com/Processor\x12L\x0A\x11processor_version\x18\x02 \x01(\x0B2,.google.cloud.documentai.v1.ProcessorVersionB\x03\xE0A\x02\x12H\x0A\x0Fdocument_schema\x18\x0A \x01(\x0B2*.google.cloud.documentai.v1.DocumentSchemaB\x03\xE0A\x01\x12[\x0A\x0Ainput_data\x18\x04 \x01(\x0B2B.google.cloud.documentai.v1.TrainProcessorVersionRequest.InputDataB\x03\xE0A\x01\x12#\x0A\x16base_processor_version\x18\x08 \x01(\x09B\x03\xE0A\x01\x1A\xAD\x01\x0A\x09InputData\x12Q\x0A\x12training_documents\x18\x03 \x01(\x0B25.google.cloud.documentai.v1.BatchDocumentsInputConfig\x12M\x0A\x0Etest_documents\x18\x04 \x01(\x0B25.google.cloud.documentai.v1.BatchDocumentsInputConfig\x1A\x81\x02\x0A\x1FCustomDocumentExtractionOptions\x12\x85\x01\x0A\x0Ftraining_method\x18\x03 \x01(\x0E2g.google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions.TrainingMethodB\x03\xE0A\x01\"V\x0A\x0ETrainingMethod\x12\x1F\x0A\x1BTRAINING_METHOD_UNSPECIFIED\x10\x00\x12\x0F\x0A\x0BMODEL_BASED\x10\x01\x12\x12\x0A\x0ETEMPLATE_BASED\x10\x02\x1A_\x0A\x1CFoundationModelTuningOptions\x12\x18\x0A\x0Btrain_steps\x18\x02 \x01(\x05B\x03\xE0A\x01\x12%\x0A\x18learning_rate_multiplier\x18\x03 \x01(\x02B\x03\xE0A\x01B\x11\x0A\x0Fprocessor_flags\":\x0A\x1DTrainProcessorVersionResponse\x12\x19\x0A\x11processor_version\x18\x01 \x01(\x09\"\xF7\x03\x0A\x1DTrainProcessorVersionMetadata\x12L\x0A\x0Fcommon_metadata\x18\x01 \x01(\x0B23.google.cloud.documentai.v1.CommonOperationMetadata\x12p\x0A\x1Btraining_dataset_validation\x18\x02 \x01(\x0B2K.google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation\x12l\x0A\x17test_dataset_validation\x18\x03 \x01(\x0B2K.google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation\x1A\xA7\x01\x0A\x11DatasetValidation\x12\x1C\x0A\x14document_error_count\x18\x03 \x01(\x05\x12\x1B\x0A\x13dataset_error_count\x18\x04 \x01(\x05\x12+\x0A\x0Fdocument_errors\x18\x01 \x03(\x0B2\x12.google.rpc.Status\x12*\x0A\x0Edataset_errors\x18\x02 \x03(\x0B2\x12.google.rpc.Status\"\x8E\x03\x0A\x15ReviewDocumentRequest\x12?\x0A\x0Finline_document\x18\x04 \x01(\x0B2\$.google.cloud.documentai.v1.DocumentH\x00\x12P\x0A\x13human_review_config\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+documentai.googleapis.com/HumanReviewConfig\x12 \x0A\x18enable_schema_validation\x18\x03 \x01(\x08\x12L\x0A\x08priority\x18\x05 \x01(\x0E2:.google.cloud.documentai.v1.ReviewDocumentRequest.Priority\x12C\x0A\x0Fdocument_schema\x18\x06 \x01(\x0B2*.google.cloud.documentai.v1.DocumentSchema\"#\x0A\x08Priority\x12\x0B\x0A\x07DEFAULT\x10\x00\x12\x0A\x0A\x06URGENT\x10\x01B\x08\x0A\x06source\"\xD1\x01\x0A\x16ReviewDocumentResponse\x12\x17\x0A\x0Fgcs_destination\x18\x01 \x01(\x09\x12G\x0A\x05state\x18\x02 \x01(\x0E28.google.cloud.documentai.v1.ReviewDocumentResponse.State\x12\x18\x0A\x10rejection_reason\x18\x03 \x01(\x09\";\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08REJECTED\x10\x01\x12\x0D\x0A\x09SUCCEEDED\x10\x02\"\x84\x01\x0A\x1FReviewDocumentOperationMetadata\x12L\x0A\x0Fcommon_metadata\x18\x05 \x01(\x0B23.google.cloud.documentai.v1.CommonOperationMetadata\x12\x13\x0A\x0Bquestion_id\x18\x06 \x01(\x09\"\xCA\x01\x0A\x1FEvaluateProcessorVersionRequest\x12M\x0A\x11processor_version\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x0A*documentai.googleapis.com/ProcessorVersion\x12X\x0A\x14evaluation_documents\x18\x03 \x01(\x0B25.google.cloud.documentai.v1.BatchDocumentsInputConfigB\x03\xE0A\x01\"p\x0A EvaluateProcessorVersionMetadata\x12L\x0A\x0Fcommon_metadata\x18\x01 \x01(\x0B23.google.cloud.documentai.v1.CommonOperationMetadata\"6\x0A EvaluateProcessorVersionResponse\x12\x12\x0A\x0Aevaluation\x18\x02 \x01(\x09\"R\x0A\x14GetEvaluationRequest\x12:\x0A\x04name\x18\x01 \x01(\x09B,\xE0A\x02\xFAA&\x0A\$documentai.googleapis.com/Evaluation\"\x83\x01\x0A\x16ListEvaluationsRequest\x12B\x0A\x06parent\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x0A*documentai.googleapis.com/ProcessorVersion\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"o\x0A\x17ListEvaluationsResponse\x12;\x0A\x0Bevaluations\x18\x01 \x03(\x0B2&.google.cloud.documentai.v1.Evaluation\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x092\x9C*\x0A\x18DocumentProcessorService\x12\x87\x02\x0A\x0FProcessDocument\x12*.google.cloud.documentai.v1.ProcessRequest\x1A+.google.cloud.documentai.v1.ProcessResponse\"\x9A\x01\xDAA\x04name\x82\xD3\xE4\x93\x02\x8C\x01\"6/v1/{name=projects/*/locations/*/processors/*}:process:\x01*ZO\"J/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}:process:\x01*\x12\xBD\x02\x0A\x15BatchProcessDocuments\x12/.google.cloud.documentai.v1.BatchProcessRequest\x1A\x1D.google.longrunning.Operation\"\xD3\x01\xCAA,\x0A\x14BatchProcessResponse\x12\x14BatchProcessMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02\x96\x01\";/v1/{name=projects/*/locations/*/processors/*}:batchProcess:\x01*ZT\"O/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}:batchProcess:\x01*\x12\xD0\x01\x0A\x13FetchProcessorTypes\x126.google.cloud.documentai.v1.FetchProcessorTypesRequest\x1A7.google.cloud.documentai.v1.FetchProcessorTypesResponse\"H\xDAA\x06parent\x82\xD3\xE4\x93\x029\x127/v1/{parent=projects/*/locations/*}:fetchProcessorTypes\x12\xC8\x01\x0A\x12ListProcessorTypes\x125.google.cloud.documentai.v1.ListProcessorTypesRequest\x1A6.google.cloud.documentai.v1.ListProcessorTypesResponse\"C\xDAA\x06parent\x82\xD3\xE4\x93\x024\x122/v1/{parent=projects/*/locations/*}/processorTypes\x12\xB5\x01\x0A\x10GetProcessorType\x123.google.cloud.documentai.v1.GetProcessorTypeRequest\x1A).google.cloud.documentai.v1.ProcessorType\"A\xDAA\x04name\x82\xD3\xE4\x93\x024\x122/v1/{name=projects/*/locations/*/processorTypes/*}\x12\xB8\x01\x0A\x0EListProcessors\x121.google.cloud.documentai.v1.ListProcessorsRequest\x1A2.google.cloud.documentai.v1.ListProcessorsResponse\"?\xDAA\x06parent\x82\xD3\xE4\x93\x020\x12./v1/{parent=projects/*/locations/*}/processors\x12\xA5\x01\x0A\x0CGetProcessor\x12/.google.cloud.documentai.v1.GetProcessorRequest\x1A%.google.cloud.documentai.v1.Processor\"=\xDAA\x04name\x82\xD3\xE4\x93\x020\x12./v1/{name=projects/*/locations/*/processors/*}\x12\xA2\x02\x0A\x15TrainProcessorVersion\x128.google.cloud.documentai.v1.TrainProcessorVersionRequest\x1A\x1D.google.longrunning.Operation\"\xAF\x01\xCAA>\x0A\x1DTrainProcessorVersionResponse\x12\x1DTrainProcessorVersionMetadata\xDAA\x18parent,processor_version\x82\xD3\xE4\x93\x02M\"H/v1/{parent=projects/*/locations/*/processors/*}/processorVersions:train:\x01*\x12\xCE\x01\x0A\x13GetProcessorVersion\x126.google.cloud.documentai.v1.GetProcessorVersionRequest\x1A,.google.cloud.documentai.v1.ProcessorVersion\"Q\xDAA\x04name\x82\xD3\xE4\x93\x02D\x12B/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}\x12\xE1\x01\x0A\x15ListProcessorVersions\x128.google.cloud.documentai.v1.ListProcessorVersionsRequest\x1A9.google.cloud.documentai.v1.ListProcessorVersionsResponse\"S\xDAA\x06parent\x82\xD3\xE4\x93\x02D\x12B/v1/{parent=projects/*/locations/*/processors/*}/processorVersions\x12\x80\x02\x0A\x16DeleteProcessorVersion\x129.google.cloud.documentai.v1.DeleteProcessorVersionRequest\x1A\x1D.google.longrunning.Operation\"\x8B\x01\xCAA7\x0A\x15google.protobuf.Empty\x12\x1EDeleteProcessorVersionMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02D*B/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}\x12\x93\x02\x0A\x16DeployProcessorVersion\x129.google.cloud.documentai.v1.DeployProcessorVersionRequest\x1A\x1D.google.longrunning.Operation\"\x9E\x01\xCAA@\x0A\x1EDeployProcessorVersionResponse\x12\x1EDeployProcessorVersionMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02N\"I/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}:deploy:\x01*\x12\x9D\x02\x0A\x18UndeployProcessorVersion\x12;.google.cloud.documentai.v1.UndeployProcessorVersionRequest\x1A\x1D.google.longrunning.Operation\"\xA4\x01\xCAAD\x0A UndeployProcessorVersionResponse\x12 UndeployProcessorVersionMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02P\"K/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}:undeploy:\x01*\x12\xC2\x01\x0A\x0FCreateProcessor\x122.google.cloud.documentai.v1.CreateProcessorRequest\x1A%.google.cloud.documentai.v1.Processor\"T\xDAA\x10parent,processor\x82\xD3\xE4\x93\x02;\"./v1/{parent=projects/*/locations/*}/processors:\x09processor\x12\xD6\x01\x0A\x0FDeleteProcessor\x122.google.cloud.documentai.v1.DeleteProcessorRequest\x1A\x1D.google.longrunning.Operation\"p\xCAA0\x0A\x15google.protobuf.Empty\x12\x17DeleteProcessorMetadata\xDAA\x04name\x82\xD3\xE4\x93\x020*./v1/{name=projects/*/locations/*/processors/*}\x12\xDB\x01\x0A\x0FEnableProcessor\x122.google.cloud.documentai.v1.EnableProcessorRequest\x1A\x1D.google.longrunning.Operation\"u\xCAA2\x0A\x17EnableProcessorResponse\x12\x17EnableProcessorMetadata\x82\xD3\xE4\x93\x02:\"5/v1/{name=projects/*/locations/*/processors/*}:enable:\x01*\x12\xE0\x01\x0A\x10DisableProcessor\x123.google.cloud.documentai.v1.DisableProcessorRequest\x1A\x1D.google.longrunning.Operation\"x\xCAA4\x0A\x18DisableProcessorResponse\x12\x18DisableProcessorMetadata\x82\xD3\xE4\x93\x02;\"6/v1/{name=projects/*/locations/*/processors/*}:disable:\x01*\x12\xA1\x02\x0A\x1ASetDefaultProcessorVersion\x12=.google.cloud.documentai.v1.SetDefaultProcessorVersionRequest\x1A\x1D.google.longrunning.Operation\"\xA4\x01\xCAAH\x0A\"SetDefaultProcessorVersionResponse\x12\"SetDefaultProcessorVersionMetadata\x82\xD3\xE4\x93\x02S\"N/v1/{processor=projects/*/locations/*/processors/*}:setDefaultProcessorVersion:\x01*\x12\xA0\x02\x0A\x0EReviewDocument\x121.google.cloud.documentai.v1.ReviewDocumentRequest\x1A\x1D.google.longrunning.Operation\"\xBB\x01\xCAA9\x0A\x16ReviewDocumentResponse\x12\x1FReviewDocumentOperationMetadata\xDAA\x13human_review_config\x82\xD3\xE4\x93\x02c\"^/v1/{human_review_config=projects/*/locations/*/processors/*/humanReviewConfig}:reviewDocument:\x01*\x12\xC7\x02\x0A\x18EvaluateProcessorVersion\x12;.google.cloud.documentai.v1.EvaluateProcessorVersionRequest\x1A\x1D.google.longrunning.Operation\"\xCE\x01\xCAAD\x0A EvaluateProcessorVersionResponse\x12 EvaluateProcessorVersionMetadata\xDAA\x11processor_version\x82\xD3\xE4\x93\x02m\"h/v1/{processor_version=projects/*/locations/*/processors/*/processorVersions/*}:evaluateProcessorVersion:\x01*\x12\xCA\x01\x0A\x0DGetEvaluation\x120.google.cloud.documentai.v1.GetEvaluationRequest\x1A&.google.cloud.documentai.v1.Evaluation\"_\xDAA\x04name\x82\xD3\xE4\x93\x02R\x12P/v1/{name=projects/*/locations/*/processors/*/processorVersions/*/evaluations/*}\x12\xDD\x01\x0A\x0FListEvaluations\x122.google.cloud.documentai.v1.ListEvaluationsRequest\x1A3.google.cloud.documentai.v1.ListEvaluationsResponse\"a\xDAA\x06parent\x82\xD3\xE4\x93\x02R\x12P/v1/{parent=projects/*/locations/*/processors/*/processorVersions/*}/evaluations\x1AM\xCAA\x19documentai.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xAA\x03\x0A\x1Ecom.google.cloud.documentai.v1B\x1ADocumentAiProcessorServiceP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xAA\x02\x1AGoogle.Cloud.DocumentAI.V1\xCA\x02\x1AGoogle\\Cloud\\DocumentAI\\V1\xEA\x02\x1DGoogle::Cloud::DocumentAI::V1\xEAA\x7F\x0A+documentai.googleapis.com/HumanReviewConfig\x12Pprojects/{project}/locations/{location}/processors/{processor}/humanReviewConfig\xEAAM\x0A\"documentai.googleapis.com/Location\x12'projects/{project}/locations/{location}b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/DocumentSchema.php b/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/DocumentSchema.php deleted file mode 100644 index 43e2817c9f4b..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/DocumentSchema.php +++ /dev/null @@ -1,24 +0,0 @@ -internalAddGeneratedFile( - "\x0A\x81\x0B\x0A0google/cloud/documentai/v1/document_schema.proto\x12\x1Agoogle.cloud.documentai.v1\"\xCF\x08\x0A\x0EDocumentSchema\x12\x14\x0A\x0Cdisplay_name\x18\x01 \x01(\x09\x12\x13\x0A\x0Bdescription\x18\x02 \x01(\x09\x12K\x0A\x0Centity_types\x18\x03 \x03(\x0B25.google.cloud.documentai.v1.DocumentSchema.EntityType\x12E\x0A\x08metadata\x18\x04 \x01(\x0B23.google.cloud.documentai.v1.DocumentSchema.Metadata\x1A\xE6\x05\x0A\x0AEntityType\x12W\x0A\x0Benum_values\x18\x0E \x01(\x0B2@.google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValuesH\x00\x12\x14\x0A\x0Cdisplay_name\x18\x0D \x01(\x09\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x12\x0A\x0Abase_types\x18\x02 \x03(\x09\x12R\x0A\x0Aproperties\x18\x06 \x03(\x0B2>.google.cloud.documentai.v1.DocumentSchema.EntityType.Property\x1A\x1C\x0A\x0AEnumValues\x12\x0E\x0A\x06values\x18\x01 \x03(\x09\x1A\xC4\x03\x0A\x08Property\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x06 \x01(\x09\x12\x12\x0A\x0Avalue_type\x18\x02 \x01(\x09\x12f\x0A\x0Foccurrence_type\x18\x03 \x01(\x0E2M.google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType\x12U\x0A\x06method\x18\x08 \x01(\x0E2E.google.cloud.documentai.v1.DocumentSchema.EntityType.Property.Method\"\x85\x01\x0A\x0EOccurrenceType\x12\x1F\x0A\x1BOCCURRENCE_TYPE_UNSPECIFIED\x10\x00\x12\x11\x0A\x0DOPTIONAL_ONCE\x10\x01\x12\x15\x0A\x11OPTIONAL_MULTIPLE\x10\x02\x12\x11\x0A\x0DREQUIRED_ONCE\x10\x03\x12\x15\x0A\x11REQUIRED_MULTIPLE\x10\x04\"9\x0A\x06Method\x12\x16\x0A\x12METHOD_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07EXTRACT\x10\x01\x12\x0A\x0A\x06DERIVE\x10\x02B\x0E\x0A\x0Cvalue_source\x1A\x94\x01\x0A\x08Metadata\x12\x19\x0A\x11document_splitter\x18\x01 \x01(\x08\x12&\x0A\x1Edocument_allow_multiple_labels\x18\x02 \x01(\x08\x12%\x0A\x1Dprefixed_naming_on_properties\x18\x06 \x01(\x08\x12\x1E\x0A\x16skip_naming_validation\x18\x07 \x01(\x08B\xD6\x01\x0A\x1Ecom.google.cloud.documentai.v1B\x18DocumentAiDocumentSchemaP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xAA\x02\x1AGoogle.Cloud.DocumentAI.V1\xCA\x02\x1AGoogle\\Cloud\\DocumentAI\\V1\xEA\x02\x1DGoogle::Cloud::DocumentAI::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Evaluation.php b/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Evaluation.php deleted file mode 100644 index 792d9db5809b..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Evaluation.php +++ /dev/null @@ -1,27 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xD0\x12\x0A+google/cloud/documentai/v1/evaluation.proto\x12\x1Agoogle.cloud.documentai.v1\x1A\x19google/api/resource.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x83\x02\x0A\x13EvaluationReference\x12\x11\x0A\x09operation\x18\x01 \x01(\x09\x12=\x0A\x0Aevaluation\x18\x02 \x01(\x09B)\xFAA&\x0A\$documentai.googleapis.com/Evaluation\x12I\x0A\x11aggregate_metrics\x18\x04 \x01(\x0B2..google.cloud.documentai.v1.Evaluation.Metrics\x12O\x0A\x17aggregate_metrics_exact\x18\x05 \x01(\x0B2..google.cloud.documentai.v1.Evaluation.Metrics\"\xE5\x0D\x0A\x0AEvaluation\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12/\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12J\x0A\x11document_counters\x18\x05 \x01(\x0B2/.google.cloud.documentai.v1.Evaluation.Counters\x12[\x0A\x14all_entities_metrics\x18\x03 \x01(\x0B2=.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics\x12Q\x0A\x0Eentity_metrics\x18\x04 \x03(\x0B29.google.cloud.documentai.v1.Evaluation.EntityMetricsEntry\x12\x14\x0A\x0Ckms_key_name\x18\x06 \x01(\x09\x12\x1C\x0A\x14kms_key_version_name\x18\x07 \x01(\x09\x1A\x8D\x01\x0A\x08Counters\x12\x1D\x0A\x15input_documents_count\x18\x01 \x01(\x05\x12\x1F\x0A\x17invalid_documents_count\x18\x02 \x01(\x05\x12\x1E\x0A\x16failed_documents_count\x18\x03 \x01(\x05\x12!\x0A\x19evaluated_documents_count\x18\x04 \x01(\x05\x1A\xCD\x02\x0A\x07Metrics\x12\x11\x0A\x09precision\x18\x01 \x01(\x02\x12\x0E\x0A\x06recall\x18\x02 \x01(\x02\x12\x10\x0A\x08f1_score\x18\x03 \x01(\x02\x12#\x0A\x1Bpredicted_occurrences_count\x18\x04 \x01(\x05\x12&\x0A\x1Eground_truth_occurrences_count\x18\x05 \x01(\x05\x12 \x0A\x18predicted_document_count\x18\x0A \x01(\x05\x12#\x0A\x1Bground_truth_document_count\x18\x0B \x01(\x05\x12\x1C\x0A\x14true_positives_count\x18\x06 \x01(\x05\x12\x1D\x0A\x15false_positives_count\x18\x07 \x01(\x05\x12\x1D\x0A\x15false_negatives_count\x18\x08 \x01(\x05\x12\x1D\x0A\x15total_documents_count\x18\x09 \x01(\x05\x1As\x0A\x16ConfidenceLevelMetrics\x12\x18\x0A\x10confidence_level\x18\x01 \x01(\x02\x12?\x0A\x07metrics\x18\x02 \x01(\x0B2..google.cloud.documentai.v1.Evaluation.Metrics\x1A\xF1\x03\x0A\x16MultiConfidenceMetrics\x12_\x0A\x18confidence_level_metrics\x18\x01 \x03(\x0B2=.google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics\x12e\x0A\x1Econfidence_level_metrics_exact\x18\x04 \x03(\x0B2=.google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics\x12\x0D\x0A\x05auprc\x18\x02 \x01(\x02\x12#\x0A\x1Bestimated_calibration_error\x18\x03 \x01(\x02\x12\x13\x0A\x0Bauprc_exact\x18\x05 \x01(\x02\x12)\x0A!estimated_calibration_error_exact\x18\x06 \x01(\x02\x12_\x0A\x0Cmetrics_type\x18\x07 \x01(\x0E2I.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.MetricsType\":\x0A\x0BMetricsType\x12\x1C\x0A\x18METRICS_TYPE_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09AGGREGATE\x10\x01\x1As\x0A\x12EntityMetricsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12L\x0A\x05value\x18\x02 \x01(\x0B2=.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics:\x028\x01:\xA9\x01\xEAA\xA5\x01\x0A\$documentai.googleapis.com/Evaluation\x12}projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}B\xD2\x01\x0A\x1Ecom.google.cloud.documentai.v1B\x14DocumentAiEvaluationP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xAA\x02\x1AGoogle.Cloud.DocumentAI.V1\xCA\x02\x1AGoogle\\Cloud\\DocumentAI\\V1\xEA\x02\x1DGoogle::Cloud::DocumentAI::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Geometry.php b/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Geometry.php deleted file mode 100644 index faf0e564072a..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Geometry.php +++ /dev/null @@ -1,24 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xF9\x03\x0A)google/cloud/documentai/v1/geometry.proto\x12\x1Agoogle.cloud.documentai.v1\"\x1E\x0A\x06Vertex\x12\x09\x0A\x01x\x18\x01 \x01(\x05\x12\x09\x0A\x01y\x18\x02 \x01(\x05\"(\x0A\x10NormalizedVertex\x12\x09\x0A\x01x\x18\x01 \x01(\x02\x12\x09\x0A\x01y\x18\x02 \x01(\x02\"\x8F\x01\x0A\x0CBoundingPoly\x124\x0A\x08vertices\x18\x01 \x03(\x0B2\".google.cloud.documentai.v1.Vertex\x12I\x0A\x13normalized_vertices\x18\x02 \x03(\x0B2,.google.cloud.documentai.v1.NormalizedVertexB\xCB\x01\x0A\x1Ecom.google.cloud.documentai.v1B\x0DGeometryProtoP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xAA\x02\x1AGoogle.Cloud.DocumentAI.V1\xCA\x02\x1AGoogle\\Cloud\\DocumentAI\\V1\xEA\x02\x1DGoogle::Cloud::DocumentAI::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/OperationMetadata.php b/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/OperationMetadata.php deleted file mode 100644 index ee3d45f728bb..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/OperationMetadata.php +++ /dev/null @@ -1,25 +0,0 @@ -internalAddGeneratedFile( - "\x0A\x88\x05\x0A3google/cloud/documentai/v1/operation_metadata.proto\x12\x1Agoogle.cloud.documentai.v1\"\xD5\x02\x0A\x17CommonOperationMetadata\x12H\x0A\x05state\x18\x01 \x01(\x0E29.google.cloud.documentai.v1.CommonOperationMetadata.State\x12\x15\x0A\x0Dstate_message\x18\x02 \x01(\x09\x12\x10\x0A\x08resource\x18\x05 \x01(\x09\x12/\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12/\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\"e\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07RUNNING\x10\x01\x12\x0E\x0A\x0ACANCELLING\x10\x02\x12\x0D\x0A\x09SUCCEEDED\x10\x03\x12\x0A\x0A\x06FAILED\x10\x04\x12\x0D\x0A\x09CANCELLED\x10\x05B\xD4\x01\x0A\x1Ecom.google.cloud.documentai.v1B\x16OperationMetadataProtoP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xAA\x02\x1AGoogle.Cloud.DocumentAI.V1\xCA\x02\x1AGoogle\\Cloud\\DocumentAI\\V1\xEA\x02\x1DGoogle::Cloud::DocumentAI::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Processor.php b/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Processor.php deleted file mode 100644 index 3eac7d7ace95..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/Processor.php +++ /dev/null @@ -1,29 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xA7\x19\x0A*google/cloud/documentai/v1/processor.proto\x12\x1Agoogle.cloud.documentai.v1\x1A\x19google/api/resource.proto\x1A0google/cloud/documentai/v1/document_schema.proto\x1A+google/cloud/documentai/v1/evaluation.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xA9\x0F\x0A\x10ProcessorVersion\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x14\x0A\x0Cdisplay_name\x18\x02 \x01(\x09\x12H\x0A\x0Fdocument_schema\x18\x0C \x01(\x0B2*.google.cloud.documentai.v1.DocumentSchemaB\x03\xE0A\x03\x12F\x0A\x05state\x18\x06 \x01(\x0E22.google.cloud.documentai.v1.ProcessorVersion.StateB\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12O\x0A\x11latest_evaluation\x18\x08 \x01(\x0B2/.google.cloud.documentai.v1.EvaluationReferenceB\x03\xE0A\x03\x12\x19\x0A\x0Ckms_key_name\x18\x09 \x01(\x09B\x03\xE0A\x03\x12!\x0A\x14kms_key_version_name\x18\x0A \x01(\x09B\x03\xE0A\x03\x12\x1B\x0A\x0Egoogle_managed\x18\x0B \x01(\x08B\x03\xE0A\x03\x12[\x0A\x10deprecation_info\x18\x0D \x01(\x0B2<.google.cloud.documentai.v1.ProcessorVersion.DeprecationInfoB\x03\xE0A\x03\x12O\x0A\x0Amodel_type\x18\x0F \x01(\x0E26.google.cloud.documentai.v1.ProcessorVersion.ModelTypeB\x03\xE0A\x03\x12\x1A\x0A\x0Dsatisfies_pzs\x18\x10 \x01(\x08B\x03\xE0A\x03\x12\x1A\x0A\x0Dsatisfies_pzi\x18\x11 \x01(\x08B\x03\xE0A\x03\x12[\x0A\x11gen_ai_model_info\x18\x12 \x01(\x0B2;.google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfoB\x03\xE0A\x03\x1A\x9F\x01\x0A\x0FDeprecationInfo\x124\x0A\x10deprecation_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12V\x0A\x1Dreplacement_processor_version\x18\x02 \x01(\x09B/\xFAA,\x0A*documentai.googleapis.com/ProcessorVersion\x1A\x88\x05\x0A\x0EGenAiModelInfo\x12|\x0A\x1Cfoundation_gen_ai_model_info\x18\x01 \x01(\x0B2T.google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.FoundationGenAiModelInfoH\x00\x12t\x0A\x18custom_gen_ai_model_info\x18\x02 \x01(\x0B2P.google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.CustomGenAiModelInfoH\x00\x1A[\x0A\x18FoundationGenAiModelInfo\x12\x1A\x0A\x12finetuning_allowed\x18\x01 \x01(\x08\x12#\x0A\x1Bmin_train_labeled_documents\x18\x02 \x01(\x05\x1A\x96\x02\x0A\x14CustomGenAiModelInfo\x12{\x0A\x11custom_model_type\x18\x01 \x01(\x0E2`.google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.CustomGenAiModelInfo.CustomModelType\x12!\x0A\x19base_processor_version_id\x18\x02 \x01(\x09\"^\x0A\x0FCustomModelType\x12!\x0A\x1DCUSTOM_MODEL_TYPE_UNSPECIFIED\x10\x00\x12\x18\x0A\x14VERSIONED_FOUNDATION\x10\x01\x12\x0E\x0A\x0AFINE_TUNED\x10\x02B\x0C\x0A\x0Amodel_info\"\x93\x01\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08DEPLOYED\x10\x01\x12\x0D\x0A\x09DEPLOYING\x10\x02\x12\x0E\x0A\x0AUNDEPLOYED\x10\x03\x12\x0F\x0A\x0BUNDEPLOYING\x10\x04\x12\x0C\x0A\x08CREATING\x10\x05\x12\x0C\x0A\x08DELETING\x10\x06\x12\x0A\x0A\x06FAILED\x10\x07\x12\x0D\x0A\x09IMPORTING\x10\x08\"Y\x0A\x09ModelType\x12\x1A\x0A\x16MODEL_TYPE_UNSPECIFIED\x10\x00\x12\x19\x0A\x15MODEL_TYPE_GENERATIVE\x10\x01\x12\x15\x0A\x11MODEL_TYPE_CUSTOM\x10\x02:\x96\x01\xEAA\x92\x01\x0A*documentai.googleapis.com/ProcessorVersion\x12dprojects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}\"r\x0A\x15ProcessorVersionAlias\x12\x0D\x0A\x05alias\x18\x01 \x01(\x09\x12J\x0A\x11processor_version\x18\x02 \x01(\x09B/\xFAA,\x0A*documentai.googleapis.com/ProcessorVersion\"\xC5\x05\x0A\x09Processor\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x05\xE0A\x03\x12\x0C\x0A\x04type\x18\x02 \x01(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x03 \x01(\x09\x12?\x0A\x05state\x18\x04 \x01(\x0E2+.google.cloud.documentai.v1.Processor.StateB\x03\xE0A\x03\x12R\x0A\x19default_processor_version\x18\x09 \x01(\x09B/\xFAA,\x0A*documentai.googleapis.com/ProcessorVersion\x12Y\x0A\x19processor_version_aliases\x18\x0A \x03(\x0B21.google.cloud.documentai.v1.ProcessorVersionAliasB\x03\xE0A\x03\x12 \x0A\x10process_endpoint\x18\x06 \x01(\x09B\x06\xE0A\x03\xE0A\x05\x124\x0A\x0Bcreate_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x14\x0A\x0Ckms_key_name\x18\x08 \x01(\x09\x12\x1A\x0A\x0Dsatisfies_pzs\x18\x0C \x01(\x08B\x03\xE0A\x03\x12\x1A\x0A\x0Dsatisfies_pzi\x18\x0D \x01(\x08B\x03\xE0A\x03\"~\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07ENABLED\x10\x01\x12\x0C\x0A\x08DISABLED\x10\x02\x12\x0C\x0A\x08ENABLING\x10\x03\x12\x0D\x0A\x09DISABLING\x10\x04\x12\x0C\x0A\x08CREATING\x10\x05\x12\x0A\x0A\x06FAILED\x10\x06\x12\x0C\x0A\x08DELETING\x10\x07:h\xEAAe\x0A#documentai.googleapis.com/Processor\x12>projects/{project}/locations/{location}/processors/{processor}B\xD1\x01\x0A\x1Ecom.google.cloud.documentai.v1B\x13DocumentAiProcessorP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xAA\x02\x1AGoogle.Cloud.DocumentAI.V1\xCA\x02\x1AGoogle\\Cloud\\DocumentAI\\V1\xEA\x02\x1DGoogle::Cloud::DocumentAI::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/ProcessorType.php b/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/ProcessorType.php deleted file mode 100644 index af8cfd769331..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/GPBMetadata/Google/Cloud/Documentai/V1/ProcessorType.php +++ /dev/null @@ -1,26 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xDE\x05\x0A/google/cloud/documentai/v1/processor_type.proto\x12\x1Agoogle.cloud.documentai.v1\x1A\x19google/api/resource.proto\"\x93\x03\x0A\x0DProcessorType\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x0C\x0A\x04type\x18\x02 \x01(\x09\x12\x10\x0A\x08category\x18\x03 \x01(\x09\x12S\x0A\x13available_locations\x18\x04 \x03(\x0B26.google.cloud.documentai.v1.ProcessorType.LocationInfo\x12\x16\x0A\x0Eallow_creation\x18\x06 \x01(\x08\x12-\x0A\x0Claunch_stage\x18\x08 \x01(\x0E2\x17.google.api.LaunchStage\x12\x1C\x0A\x14sample_document_uris\x18\x09 \x03(\x09\x1A#\x0A\x0CLocationInfo\x12\x13\x0A\x0Blocation_id\x18\x01 \x01(\x09:u\xEAAr\x0A'documentai.googleapis.com/ProcessorType\x12Gprojects/{project}/locations/{location}/processorTypes/{processor_type}B\xD5\x01\x0A\x1Ecom.google.cloud.documentai.v1B\x17DocumentAiProcessorTypeP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xAA\x02\x1AGoogle.Cloud.DocumentAI.V1\xCA\x02\x1AGoogle\\Cloud\\DocumentAI\\V1\xEA\x02\x1DGoogle::Cloud::DocumentAI::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Barcode.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Barcode.php deleted file mode 100644 index 32bd1b42fe8b..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Barcode.php +++ /dev/null @@ -1,255 +0,0 @@ -google.cloud.documentai.v1.Barcode - */ -class Barcode extends \Google\Protobuf\Internal\Message -{ - /** - * Format of a barcode. - * The supported formats are: - * - `CODE_128`: Code 128 type. - * - `CODE_39`: Code 39 type. - * - `CODE_93`: Code 93 type. - * - `CODABAR`: Codabar type. - * - `DATA_MATRIX`: 2D Data Matrix type. - * - `ITF`: ITF type. - * - `EAN_13`: EAN-13 type. - * - `EAN_8`: EAN-8 type. - * - `QR_CODE`: 2D QR code type. - * - `UPC_A`: UPC-A type. - * - `UPC_E`: UPC-E type. - * - `PDF417`: PDF417 type. - * - `AZTEC`: 2D Aztec code type. - * - `DATABAR`: GS1 DataBar code type. - * - * Generated from protobuf field string format = 1; - */ - protected $format = ''; - /** - * Value format describes the format of the value that a barcode - * encodes. - * The supported formats are: - * - `CONTACT_INFO`: Contact information. - * - `EMAIL`: Email address. - * - `ISBN`: ISBN identifier. - * - `PHONE`: Phone number. - * - `PRODUCT`: Product. - * - `SMS`: SMS message. - * - `TEXT`: Text string. - * - `URL`: URL address. - * - `WIFI`: Wifi information. - * - `GEO`: Geo-localization. - * - `CALENDAR_EVENT`: Calendar event. - * - `DRIVER_LICENSE`: Driver's license. - * - * Generated from protobuf field string value_format = 2; - */ - protected $value_format = ''; - /** - * Raw value encoded in the barcode. - * For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`. - * - * Generated from protobuf field string raw_value = 3; - */ - protected $raw_value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $format - * Format of a barcode. - * The supported formats are: - * - `CODE_128`: Code 128 type. - * - `CODE_39`: Code 39 type. - * - `CODE_93`: Code 93 type. - * - `CODABAR`: Codabar type. - * - `DATA_MATRIX`: 2D Data Matrix type. - * - `ITF`: ITF type. - * - `EAN_13`: EAN-13 type. - * - `EAN_8`: EAN-8 type. - * - `QR_CODE`: 2D QR code type. - * - `UPC_A`: UPC-A type. - * - `UPC_E`: UPC-E type. - * - `PDF417`: PDF417 type. - * - `AZTEC`: 2D Aztec code type. - * - `DATABAR`: GS1 DataBar code type. - * @type string $value_format - * Value format describes the format of the value that a barcode - * encodes. - * The supported formats are: - * - `CONTACT_INFO`: Contact information. - * - `EMAIL`: Email address. - * - `ISBN`: ISBN identifier. - * - `PHONE`: Phone number. - * - `PRODUCT`: Product. - * - `SMS`: SMS message. - * - `TEXT`: Text string. - * - `URL`: URL address. - * - `WIFI`: Wifi information. - * - `GEO`: Geo-localization. - * - `CALENDAR_EVENT`: Calendar event. - * - `DRIVER_LICENSE`: Driver's license. - * @type string $raw_value - * Raw value encoded in the barcode. - * For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Barcode::initOnce(); - parent::__construct($data); - } - - /** - * Format of a barcode. - * The supported formats are: - * - `CODE_128`: Code 128 type. - * - `CODE_39`: Code 39 type. - * - `CODE_93`: Code 93 type. - * - `CODABAR`: Codabar type. - * - `DATA_MATRIX`: 2D Data Matrix type. - * - `ITF`: ITF type. - * - `EAN_13`: EAN-13 type. - * - `EAN_8`: EAN-8 type. - * - `QR_CODE`: 2D QR code type. - * - `UPC_A`: UPC-A type. - * - `UPC_E`: UPC-E type. - * - `PDF417`: PDF417 type. - * - `AZTEC`: 2D Aztec code type. - * - `DATABAR`: GS1 DataBar code type. - * - * Generated from protobuf field string format = 1; - * @return string - */ - public function getFormat() - { - return $this->format; - } - - /** - * Format of a barcode. - * The supported formats are: - * - `CODE_128`: Code 128 type. - * - `CODE_39`: Code 39 type. - * - `CODE_93`: Code 93 type. - * - `CODABAR`: Codabar type. - * - `DATA_MATRIX`: 2D Data Matrix type. - * - `ITF`: ITF type. - * - `EAN_13`: EAN-13 type. - * - `EAN_8`: EAN-8 type. - * - `QR_CODE`: 2D QR code type. - * - `UPC_A`: UPC-A type. - * - `UPC_E`: UPC-E type. - * - `PDF417`: PDF417 type. - * - `AZTEC`: 2D Aztec code type. - * - `DATABAR`: GS1 DataBar code type. - * - * Generated from protobuf field string format = 1; - * @param string $var - * @return $this - */ - public function setFormat($var) - { - GPBUtil::checkString($var, True); - $this->format = $var; - - return $this; - } - - /** - * Value format describes the format of the value that a barcode - * encodes. - * The supported formats are: - * - `CONTACT_INFO`: Contact information. - * - `EMAIL`: Email address. - * - `ISBN`: ISBN identifier. - * - `PHONE`: Phone number. - * - `PRODUCT`: Product. - * - `SMS`: SMS message. - * - `TEXT`: Text string. - * - `URL`: URL address. - * - `WIFI`: Wifi information. - * - `GEO`: Geo-localization. - * - `CALENDAR_EVENT`: Calendar event. - * - `DRIVER_LICENSE`: Driver's license. - * - * Generated from protobuf field string value_format = 2; - * @return string - */ - public function getValueFormat() - { - return $this->value_format; - } - - /** - * Value format describes the format of the value that a barcode - * encodes. - * The supported formats are: - * - `CONTACT_INFO`: Contact information. - * - `EMAIL`: Email address. - * - `ISBN`: ISBN identifier. - * - `PHONE`: Phone number. - * - `PRODUCT`: Product. - * - `SMS`: SMS message. - * - `TEXT`: Text string. - * - `URL`: URL address. - * - `WIFI`: Wifi information. - * - `GEO`: Geo-localization. - * - `CALENDAR_EVENT`: Calendar event. - * - `DRIVER_LICENSE`: Driver's license. - * - * Generated from protobuf field string value_format = 2; - * @param string $var - * @return $this - */ - public function setValueFormat($var) - { - GPBUtil::checkString($var, True); - $this->value_format = $var; - - return $this; - } - - /** - * Raw value encoded in the barcode. - * For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`. - * - * Generated from protobuf field string raw_value = 3; - * @return string - */ - public function getRawValue() - { - return $this->raw_value; - } - - /** - * Raw value encoded in the barcode. - * For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`. - * - * Generated from protobuf field string raw_value = 3; - * @param string $var - * @return $this - */ - public function setRawValue($var) - { - GPBUtil::checkString($var, True); - $this->raw_value = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchDocumentsInputConfig.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchDocumentsInputConfig.php deleted file mode 100644 index 99740463f11c..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchDocumentsInputConfig.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.documentai.v1.BatchDocumentsInputConfig - */ -class BatchDocumentsInputConfig extends \Google\Protobuf\Internal\Message -{ - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\GcsPrefix $gcs_prefix - * The set of documents that match the specified Cloud Storage `gcs_prefix`. - * @type \Google\Cloud\DocumentAI\V1\GcsDocuments $gcs_documents - * The set of documents individually specified on Cloud Storage. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentIo::initOnce(); - parent::__construct($data); - } - - /** - * The set of documents that match the specified Cloud Storage `gcs_prefix`. - * - * Generated from protobuf field .google.cloud.documentai.v1.GcsPrefix gcs_prefix = 1; - * @return \Google\Cloud\DocumentAI\V1\GcsPrefix|null - */ - public function getGcsPrefix() - { - return $this->readOneof(1); - } - - public function hasGcsPrefix() - { - return $this->hasOneof(1); - } - - /** - * The set of documents that match the specified Cloud Storage `gcs_prefix`. - * - * Generated from protobuf field .google.cloud.documentai.v1.GcsPrefix gcs_prefix = 1; - * @param \Google\Cloud\DocumentAI\V1\GcsPrefix $var - * @return $this - */ - public function setGcsPrefix($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\GcsPrefix::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The set of documents individually specified on Cloud Storage. - * - * Generated from protobuf field .google.cloud.documentai.v1.GcsDocuments gcs_documents = 2; - * @return \Google\Cloud\DocumentAI\V1\GcsDocuments|null - */ - public function getGcsDocuments() - { - return $this->readOneof(2); - } - - public function hasGcsDocuments() - { - return $this->hasOneof(2); - } - - /** - * The set of documents individually specified on Cloud Storage. - * - * Generated from protobuf field .google.cloud.documentai.v1.GcsDocuments gcs_documents = 2; - * @param \Google\Cloud\DocumentAI\V1\GcsDocuments $var - * @return $this - */ - public function setGcsDocuments($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\GcsDocuments::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessMetadata.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessMetadata.php deleted file mode 100644 index 46b4ab45c885..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessMetadata.php +++ /dev/null @@ -1,228 +0,0 @@ -google.cloud.documentai.v1.BatchProcessMetadata - */ -class BatchProcessMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The state of the current batch processing. - * - * Generated from protobuf field .google.cloud.documentai.v1.BatchProcessMetadata.State state = 1; - */ - protected $state = 0; - /** - * A message providing more details about the current state of processing. - * For example, the error message if the operation is failed. - * - * Generated from protobuf field string state_message = 2; - */ - protected $state_message = ''; - /** - * The creation time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - */ - protected $create_time = null; - /** - * The last update time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - */ - protected $update_time = null; - /** - * The list of response details of each document. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5; - */ - private $individual_process_statuses; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * The state of the current batch processing. - * @type string $state_message - * A message providing more details about the current state of processing. - * For example, the error message if the operation is failed. - * @type \Google\Protobuf\Timestamp $create_time - * The creation time of the operation. - * @type \Google\Protobuf\Timestamp $update_time - * The last update time of the operation. - * @type \Google\Cloud\DocumentAI\V1\BatchProcessMetadata\IndividualProcessStatus[] $individual_process_statuses - * The list of response details of each document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * The state of the current batch processing. - * - * Generated from protobuf field .google.cloud.documentai.v1.BatchProcessMetadata.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of the current batch processing. - * - * Generated from protobuf field .google.cloud.documentai.v1.BatchProcessMetadata.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\BatchProcessMetadata\State::class); - $this->state = $var; - - return $this; - } - - /** - * A message providing more details about the current state of processing. - * For example, the error message if the operation is failed. - * - * Generated from protobuf field string state_message = 2; - * @return string - */ - public function getStateMessage() - { - return $this->state_message; - } - - /** - * A message providing more details about the current state of processing. - * For example, the error message if the operation is failed. - * - * Generated from protobuf field string state_message = 2; - * @param string $var - * @return $this - */ - public function setStateMessage($var) - { - GPBUtil::checkString($var, True); - $this->state_message = $var; - - return $this; - } - - /** - * The creation time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * The creation time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The last update time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * The last update time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * The list of response details of each document. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\BatchProcessMetadata\IndividualProcessStatus> - */ - public function getIndividualProcessStatuses() - { - return $this->individual_process_statuses; - } - - /** - * The list of response details of each document. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5; - * @param \Google\Cloud\DocumentAI\V1\BatchProcessMetadata\IndividualProcessStatus[] $var - * @return $this - */ - public function setIndividualProcessStatuses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\BatchProcessMetadata\IndividualProcessStatus::class); - $this->individual_process_statuses = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessMetadata/IndividualProcessStatus.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessMetadata/IndividualProcessStatus.php deleted file mode 100644 index 31740cc3a034..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessMetadata/IndividualProcessStatus.php +++ /dev/null @@ -1,205 +0,0 @@ -google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus - */ -class IndividualProcessStatus extends \Google\Protobuf\Internal\Message -{ - /** - * The source of the document, same as the - * [input_gcs_source][google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus.input_gcs_source] - * field in the request when the batch process started. - * - * Generated from protobuf field string input_gcs_source = 1; - */ - protected $input_gcs_source = ''; - /** - * The status processing the document. - * - * Generated from protobuf field .google.rpc.Status status = 2; - */ - protected $status = null; - /** - * The Cloud Storage output destination (in the request as - * [DocumentOutputConfig.GcsOutputConfig.gcs_uri][google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.gcs_uri]) - * of the processed document if it was successful, otherwise empty. - * - * Generated from protobuf field string output_gcs_destination = 3; - */ - protected $output_gcs_destination = ''; - /** - * The status of human review on the processed document. - * - * Generated from protobuf field .google.cloud.documentai.v1.HumanReviewStatus human_review_status = 5; - */ - protected $human_review_status = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $input_gcs_source - * The source of the document, same as the - * [input_gcs_source][google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus.input_gcs_source] - * field in the request when the batch process started. - * @type \Google\Rpc\Status $status - * The status processing the document. - * @type string $output_gcs_destination - * The Cloud Storage output destination (in the request as - * [DocumentOutputConfig.GcsOutputConfig.gcs_uri][google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.gcs_uri]) - * of the processed document if it was successful, otherwise empty. - * @type \Google\Cloud\DocumentAI\V1\HumanReviewStatus $human_review_status - * The status of human review on the processed document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * The source of the document, same as the - * [input_gcs_source][google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus.input_gcs_source] - * field in the request when the batch process started. - * - * Generated from protobuf field string input_gcs_source = 1; - * @return string - */ - public function getInputGcsSource() - { - return $this->input_gcs_source; - } - - /** - * The source of the document, same as the - * [input_gcs_source][google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus.input_gcs_source] - * field in the request when the batch process started. - * - * Generated from protobuf field string input_gcs_source = 1; - * @param string $var - * @return $this - */ - public function setInputGcsSource($var) - { - GPBUtil::checkString($var, True); - $this->input_gcs_source = $var; - - return $this; - } - - /** - * The status processing the document. - * - * Generated from protobuf field .google.rpc.Status status = 2; - * @return \Google\Rpc\Status|null - */ - public function getStatus() - { - return $this->status; - } - - public function hasStatus() - { - return isset($this->status); - } - - public function clearStatus() - { - unset($this->status); - } - - /** - * The status processing the document. - * - * Generated from protobuf field .google.rpc.Status status = 2; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->status = $var; - - return $this; - } - - /** - * The Cloud Storage output destination (in the request as - * [DocumentOutputConfig.GcsOutputConfig.gcs_uri][google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.gcs_uri]) - * of the processed document if it was successful, otherwise empty. - * - * Generated from protobuf field string output_gcs_destination = 3; - * @return string - */ - public function getOutputGcsDestination() - { - return $this->output_gcs_destination; - } - - /** - * The Cloud Storage output destination (in the request as - * [DocumentOutputConfig.GcsOutputConfig.gcs_uri][google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.gcs_uri]) - * of the processed document if it was successful, otherwise empty. - * - * Generated from protobuf field string output_gcs_destination = 3; - * @param string $var - * @return $this - */ - public function setOutputGcsDestination($var) - { - GPBUtil::checkString($var, True); - $this->output_gcs_destination = $var; - - return $this; - } - - /** - * The status of human review on the processed document. - * - * Generated from protobuf field .google.cloud.documentai.v1.HumanReviewStatus human_review_status = 5; - * @return \Google\Cloud\DocumentAI\V1\HumanReviewStatus|null - */ - public function getHumanReviewStatus() - { - return $this->human_review_status; - } - - public function hasHumanReviewStatus() - { - return isset($this->human_review_status); - } - - public function clearHumanReviewStatus() - { - unset($this->human_review_status); - } - - /** - * The status of human review on the processed document. - * - * Generated from protobuf field .google.cloud.documentai.v1.HumanReviewStatus human_review_status = 5; - * @param \Google\Cloud\DocumentAI\V1\HumanReviewStatus $var - * @return $this - */ - public function setHumanReviewStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\HumanReviewStatus::class); - $this->human_review_status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessMetadata/State.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessMetadata/State.php deleted file mode 100644 index 25dbecc25b0f..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessMetadata/State.php +++ /dev/null @@ -1,89 +0,0 @@ -google.cloud.documentai.v1.BatchProcessMetadata.State - */ -class State -{ - /** - * The default value. This value is used if the state is omitted. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Request operation is waiting for scheduling. - * - * Generated from protobuf enum WAITING = 1; - */ - const WAITING = 1; - /** - * Request is being processed. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * The batch processing completed successfully. - * - * Generated from protobuf enum SUCCEEDED = 3; - */ - const SUCCEEDED = 3; - /** - * The batch processing was being cancelled. - * - * Generated from protobuf enum CANCELLING = 4; - */ - const CANCELLING = 4; - /** - * The batch processing was cancelled. - * - * Generated from protobuf enum CANCELLED = 5; - */ - const CANCELLED = 5; - /** - * The batch processing has failed. - * - * Generated from protobuf enum FAILED = 6; - */ - const FAILED = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::WAITING => 'WAITING', - self::RUNNING => 'RUNNING', - self::SUCCEEDED => 'SUCCEEDED', - self::CANCELLING => 'CANCELLING', - self::CANCELLED => 'CANCELLED', - self::FAILED => 'FAILED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessRequest.php deleted file mode 100644 index f42af43fff8e..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessRequest.php +++ /dev/null @@ -1,342 +0,0 @@ -google.cloud.documentai.v1.BatchProcessRequest - */ -class BatchProcessRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of - * [Processor][google.cloud.documentai.v1.Processor] or - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. - * Format: `projects/{project}/locations/{location}/processors/{processor}`, - * or - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The input documents for the - * [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments] - * method. - * - * Generated from protobuf field .google.cloud.documentai.v1.BatchDocumentsInputConfig input_documents = 5; - */ - protected $input_documents = null; - /** - * The output configuration for the - * [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments] - * method. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentOutputConfig document_output_config = 6; - */ - protected $document_output_config = null; - /** - * Whether human review should be skipped for this request. Default to - * `false`. - * - * Generated from protobuf field bool skip_human_review = 4; - */ - protected $skip_human_review = false; - /** - * Inference-time options for the process API - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessOptions process_options = 7; - */ - protected $process_options = null; - /** - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints) and can only contain lowercase letters, numeric - * characters, underscores, and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * - * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - - /** - * @param string $name Required. The resource name of - * [Processor][google.cloud.documentai.v1.Processor] or - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. - * Format: `projects/{project}/locations/{location}/processors/{processor}`, - * or - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` - * - * @return \Google\Cloud\DocumentAI\V1\BatchProcessRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of - * [Processor][google.cloud.documentai.v1.Processor] or - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. - * Format: `projects/{project}/locations/{location}/processors/{processor}`, - * or - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` - * @type \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig $input_documents - * The input documents for the - * [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments] - * method. - * @type \Google\Cloud\DocumentAI\V1\DocumentOutputConfig $document_output_config - * The output configuration for the - * [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments] - * method. - * @type bool $skip_human_review - * Whether human review should be skipped for this request. Default to - * `false`. - * @type \Google\Cloud\DocumentAI\V1\ProcessOptions $process_options - * Inference-time options for the process API - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints) and can only contain lowercase letters, numeric - * characters, underscores, and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of - * [Processor][google.cloud.documentai.v1.Processor] or - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. - * Format: `projects/{project}/locations/{location}/processors/{processor}`, - * or - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of - * [Processor][google.cloud.documentai.v1.Processor] or - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. - * Format: `projects/{project}/locations/{location}/processors/{processor}`, - * or - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The input documents for the - * [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments] - * method. - * - * Generated from protobuf field .google.cloud.documentai.v1.BatchDocumentsInputConfig input_documents = 5; - * @return \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig|null - */ - public function getInputDocuments() - { - return $this->input_documents; - } - - public function hasInputDocuments() - { - return isset($this->input_documents); - } - - public function clearInputDocuments() - { - unset($this->input_documents); - } - - /** - * The input documents for the - * [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments] - * method. - * - * Generated from protobuf field .google.cloud.documentai.v1.BatchDocumentsInputConfig input_documents = 5; - * @param \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig $var - * @return $this - */ - public function setInputDocuments($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig::class); - $this->input_documents = $var; - - return $this; - } - - /** - * The output configuration for the - * [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments] - * method. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentOutputConfig document_output_config = 6; - * @return \Google\Cloud\DocumentAI\V1\DocumentOutputConfig|null - */ - public function getDocumentOutputConfig() - { - return $this->document_output_config; - } - - public function hasDocumentOutputConfig() - { - return isset($this->document_output_config); - } - - public function clearDocumentOutputConfig() - { - unset($this->document_output_config); - } - - /** - * The output configuration for the - * [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments] - * method. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentOutputConfig document_output_config = 6; - * @param \Google\Cloud\DocumentAI\V1\DocumentOutputConfig $var - * @return $this - */ - public function setDocumentOutputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\DocumentOutputConfig::class); - $this->document_output_config = $var; - - return $this; - } - - /** - * Whether human review should be skipped for this request. Default to - * `false`. - * - * Generated from protobuf field bool skip_human_review = 4; - * @return bool - */ - public function getSkipHumanReview() - { - return $this->skip_human_review; - } - - /** - * Whether human review should be skipped for this request. Default to - * `false`. - * - * Generated from protobuf field bool skip_human_review = 4; - * @param bool $var - * @return $this - */ - public function setSkipHumanReview($var) - { - GPBUtil::checkBool($var); - $this->skip_human_review = $var; - - return $this; - } - - /** - * Inference-time options for the process API - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessOptions process_options = 7; - * @return \Google\Cloud\DocumentAI\V1\ProcessOptions|null - */ - public function getProcessOptions() - { - return $this->process_options; - } - - public function hasProcessOptions() - { - return isset($this->process_options); - } - - public function clearProcessOptions() - { - unset($this->process_options); - } - - /** - * Inference-time options for the process API - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessOptions process_options = 7; - * @param \Google\Cloud\DocumentAI\V1\ProcessOptions $var - * @return $this - */ - public function setProcessOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\ProcessOptions::class); - $this->process_options = $var; - - return $this; - } - - /** - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints) and can only contain lowercase letters, numeric - * characters, underscores, and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * - * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints) and can only contain lowercase letters, numeric - * characters, underscores, and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * - * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessResponse.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessResponse.php deleted file mode 100644 index 6eae1dcbfd12..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BatchProcessResponse.php +++ /dev/null @@ -1,34 +0,0 @@ -google.cloud.documentai.v1.BatchProcessResponse - */ -class BatchProcessResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BoundingPoly.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BoundingPoly.php deleted file mode 100644 index 43e08dadc2e6..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/BoundingPoly.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.documentai.v1.BoundingPoly - */ -class BoundingPoly extends \Google\Protobuf\Internal\Message -{ - /** - * The bounding polygon vertices. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Vertex vertices = 1; - */ - private $vertices; - /** - * The bounding polygon normalized vertices. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.NormalizedVertex normalized_vertices = 2; - */ - private $normalized_vertices; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Vertex[] $vertices - * The bounding polygon vertices. - * @type \Google\Cloud\DocumentAI\V1\NormalizedVertex[] $normalized_vertices - * The bounding polygon normalized vertices. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Geometry::initOnce(); - parent::__construct($data); - } - - /** - * The bounding polygon vertices. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Vertex vertices = 1; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Vertex> - */ - public function getVertices() - { - return $this->vertices; - } - - /** - * The bounding polygon vertices. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Vertex vertices = 1; - * @param \Google\Cloud\DocumentAI\V1\Vertex[] $var - * @return $this - */ - public function setVertices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Vertex::class); - $this->vertices = $arr; - - return $this; - } - - /** - * The bounding polygon normalized vertices. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.NormalizedVertex normalized_vertices = 2; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\NormalizedVertex> - */ - public function getNormalizedVertices() - { - return $this->normalized_vertices; - } - - /** - * The bounding polygon normalized vertices. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.NormalizedVertex normalized_vertices = 2; - * @param \Google\Cloud\DocumentAI\V1\NormalizedVertex[] $var - * @return $this - */ - public function setNormalizedVertices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\NormalizedVertex::class); - $this->normalized_vertices = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/CommonOperationMetadata.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/CommonOperationMetadata.php deleted file mode 100644 index 3532199faf3e..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/CommonOperationMetadata.php +++ /dev/null @@ -1,223 +0,0 @@ -google.cloud.documentai.v1.CommonOperationMetadata - */ -class CommonOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The state of the operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata.State state = 1; - */ - protected $state = 0; - /** - * A message providing more details about the current state of processing. - * - * Generated from protobuf field string state_message = 2; - */ - protected $state_message = ''; - /** - * A related resource to this operation. - * - * Generated from protobuf field string resource = 5; - */ - protected $resource = ''; - /** - * The creation time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - */ - protected $create_time = null; - /** - * The last update time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * The state of the operation. - * @type string $state_message - * A message providing more details about the current state of processing. - * @type string $resource - * A related resource to this operation. - * @type \Google\Protobuf\Timestamp $create_time - * The creation time of the operation. - * @type \Google\Protobuf\Timestamp $update_time - * The last update time of the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\OperationMetadata::initOnce(); - parent::__construct($data); - } - - /** - * The state of the operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of the operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\CommonOperationMetadata\State::class); - $this->state = $var; - - return $this; - } - - /** - * A message providing more details about the current state of processing. - * - * Generated from protobuf field string state_message = 2; - * @return string - */ - public function getStateMessage() - { - return $this->state_message; - } - - /** - * A message providing more details about the current state of processing. - * - * Generated from protobuf field string state_message = 2; - * @param string $var - * @return $this - */ - public function setStateMessage($var) - { - GPBUtil::checkString($var, True); - $this->state_message = $var; - - return $this; - } - - /** - * A related resource to this operation. - * - * Generated from protobuf field string resource = 5; - * @return string - */ - public function getResource() - { - return $this->resource; - } - - /** - * A related resource to this operation. - * - * Generated from protobuf field string resource = 5; - * @param string $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkString($var, True); - $this->resource = $var; - - return $this; - } - - /** - * The creation time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * The creation time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The last update time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * The last update time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/CommonOperationMetadata/State.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/CommonOperationMetadata/State.php deleted file mode 100644 index f51928fba0ef..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/CommonOperationMetadata/State.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.documentai.v1.CommonOperationMetadata.State - */ -class State -{ - /** - * Unspecified state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Operation is still running. - * - * Generated from protobuf enum RUNNING = 1; - */ - const RUNNING = 1; - /** - * Operation is being cancelled. - * - * Generated from protobuf enum CANCELLING = 2; - */ - const CANCELLING = 2; - /** - * Operation succeeded. - * - * Generated from protobuf enum SUCCEEDED = 3; - */ - const SUCCEEDED = 3; - /** - * Operation failed. - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - /** - * Operation is cancelled. - * - * Generated from protobuf enum CANCELLED = 5; - */ - const CANCELLED = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::RUNNING => 'RUNNING', - self::CANCELLING => 'CANCELLING', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::CANCELLED => 'CANCELLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/CreateProcessorRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/CreateProcessorRequest.php deleted file mode 100644 index 8c0ee79bcdbd..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/CreateProcessorRequest.php +++ /dev/null @@ -1,161 +0,0 @@ -google.cloud.documentai.v1.CreateProcessorRequest - */ -class CreateProcessorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent (project and location) under which to create the - * processor. Format: `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The processor to be created, requires - * [Processor.type][google.cloud.documentai.v1.Processor.type] and - * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] - * to be set. Also, the - * [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] - * field must be set if the processor is under CMEK. - * - * Generated from protobuf field .google.cloud.documentai.v1.Processor processor = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $processor = null; - - /** - * @param string $parent Required. The parent (project and location) under which to create the - * processor. Format: `projects/{project}/locations/{location}` - * Please see {@see DocumentProcessorServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\DocumentAI\V1\Processor $processor Required. The processor to be created, requires - * [Processor.type][google.cloud.documentai.v1.Processor.type] and - * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] - * to be set. Also, the - * [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] - * field must be set if the processor is under CMEK. - * - * @return \Google\Cloud\DocumentAI\V1\CreateProcessorRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\DocumentAI\V1\Processor $processor): self - { - return (new self()) - ->setParent($parent) - ->setProcessor($processor); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent (project and location) under which to create the - * processor. Format: `projects/{project}/locations/{location}` - * @type \Google\Cloud\DocumentAI\V1\Processor $processor - * Required. The processor to be created, requires - * [Processor.type][google.cloud.documentai.v1.Processor.type] and - * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] - * to be set. Also, the - * [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] - * field must be set if the processor is under CMEK. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent (project and location) under which to create the - * processor. Format: `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent (project and location) under which to create the - * processor. Format: `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The processor to be created, requires - * [Processor.type][google.cloud.documentai.v1.Processor.type] and - * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] - * to be set. Also, the - * [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] - * field must be set if the processor is under CMEK. - * - * Generated from protobuf field .google.cloud.documentai.v1.Processor processor = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DocumentAI\V1\Processor|null - */ - public function getProcessor() - { - return $this->processor; - } - - public function hasProcessor() - { - return isset($this->processor); - } - - public function clearProcessor() - { - unset($this->processor); - } - - /** - * Required. The processor to be created, requires - * [Processor.type][google.cloud.documentai.v1.Processor.type] and - * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] - * to be set. Also, the - * [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] - * field must be set if the processor is under CMEK. - * - * Generated from protobuf field .google.cloud.documentai.v1.Processor processor = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DocumentAI\V1\Processor $var - * @return $this - */ - public function setProcessor($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Processor::class); - $this->processor = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorMetadata.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorMetadata.php deleted file mode 100644 index ecdd42263b56..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorMetadata.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.documentai.v1.DeleteProcessorMetadata - */ -class DeleteProcessorMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The basic metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 5; - */ - protected $common_metadata = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $common_metadata - * The basic metadata of the long-running operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * The basic metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 5; - * @return \Google\Cloud\DocumentAI\V1\CommonOperationMetadata|null - */ - public function getCommonMetadata() - { - return $this->common_metadata; - } - - public function hasCommonMetadata() - { - return isset($this->common_metadata); - } - - public function clearCommonMetadata() - { - unset($this->common_metadata); - } - - /** - * The basic metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 5; - * @param \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $var - * @return $this - */ - public function setCommonMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\CommonOperationMetadata::class); - $this->common_metadata = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorRequest.php deleted file mode 100644 index 023d2ffadf01..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorRequest.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.documentai.v1.DeleteProcessorRequest - */ -class DeleteProcessorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The processor resource name to be deleted. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The processor resource name to be deleted. Please see - * {@see DocumentProcessorServiceClient::processorName()} for help formatting this field. - * - * @return \Google\Cloud\DocumentAI\V1\DeleteProcessorRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The processor resource name to be deleted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The processor resource name to be deleted. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The processor resource name to be deleted. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorVersionMetadata.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorVersionMetadata.php deleted file mode 100644 index cca5f350d243..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorVersionMetadata.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.documentai.v1.DeleteProcessorVersionMetadata - */ -class DeleteProcessorVersionMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The basic metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; - */ - protected $common_metadata = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $common_metadata - * The basic metadata of the long-running operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * The basic metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; - * @return \Google\Cloud\DocumentAI\V1\CommonOperationMetadata|null - */ - public function getCommonMetadata() - { - return $this->common_metadata; - } - - public function hasCommonMetadata() - { - return isset($this->common_metadata); - } - - public function clearCommonMetadata() - { - unset($this->common_metadata); - } - - /** - * The basic metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; - * @param \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $var - * @return $this - */ - public function setCommonMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\CommonOperationMetadata::class); - $this->common_metadata = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorVersionRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorVersionRequest.php deleted file mode 100644 index a917757074e4..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeleteProcessorVersionRequest.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.documentai.v1.DeleteProcessorVersionRequest - */ -class DeleteProcessorVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The processor version resource name to be deleted. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The processor version resource name to be deleted. Please see - * {@see DocumentProcessorServiceClient::processorVersionName()} for help formatting this field. - * - * @return \Google\Cloud\DocumentAI\V1\DeleteProcessorVersionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The processor version resource name to be deleted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The processor version resource name to be deleted. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The processor version resource name to be deleted. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeployProcessorVersionMetadata.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeployProcessorVersionMetadata.php deleted file mode 100644 index 9bb57185bf2f..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeployProcessorVersionMetadata.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.documentai.v1.DeployProcessorVersionMetadata - */ -class DeployProcessorVersionMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The basic metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; - */ - protected $common_metadata = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $common_metadata - * The basic metadata of the long-running operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * The basic metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; - * @return \Google\Cloud\DocumentAI\V1\CommonOperationMetadata|null - */ - public function getCommonMetadata() - { - return $this->common_metadata; - } - - public function hasCommonMetadata() - { - return isset($this->common_metadata); - } - - public function clearCommonMetadata() - { - unset($this->common_metadata); - } - - /** - * The basic metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; - * @param \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $var - * @return $this - */ - public function setCommonMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\CommonOperationMetadata::class); - $this->common_metadata = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeployProcessorVersionRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeployProcessorVersionRequest.php deleted file mode 100644 index 7cbc465dbc41..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeployProcessorVersionRequest.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.documentai.v1.DeployProcessorVersionRequest - */ -class DeployProcessorVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The processor version resource name to be deployed. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The processor version resource name to be deployed. Please see - * {@see DocumentProcessorServiceClient::processorVersionName()} for help formatting this field. - * - * @return \Google\Cloud\DocumentAI\V1\DeployProcessorVersionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The processor version resource name to be deployed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The processor version resource name to be deployed. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The processor version resource name to be deployed. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeployProcessorVersionResponse.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeployProcessorVersionResponse.php deleted file mode 100644 index 4f0a4bb098e2..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DeployProcessorVersionResponse.php +++ /dev/null @@ -1,35 +0,0 @@ -google.cloud.documentai.v1.DeployProcessorVersionResponse - */ -class DeployProcessorVersionResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DisableProcessorMetadata.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DisableProcessorMetadata.php deleted file mode 100644 index fc73e56c1637..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DisableProcessorMetadata.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.documentai.v1.DisableProcessorMetadata - */ -class DisableProcessorMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The basic metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 5; - */ - protected $common_metadata = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $common_metadata - * The basic metadata of the long-running operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * The basic metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 5; - * @return \Google\Cloud\DocumentAI\V1\CommonOperationMetadata|null - */ - public function getCommonMetadata() - { - return $this->common_metadata; - } - - public function hasCommonMetadata() - { - return isset($this->common_metadata); - } - - public function clearCommonMetadata() - { - unset($this->common_metadata); - } - - /** - * The basic metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 5; - * @param \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $var - * @return $this - */ - public function setCommonMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\CommonOperationMetadata::class); - $this->common_metadata = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DisableProcessorRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DisableProcessorRequest.php deleted file mode 100644 index 5d01aa323d1b..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DisableProcessorRequest.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.documentai.v1.DisableProcessorRequest - */ -class DisableProcessorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The processor resource name to be disabled. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The processor resource name to be disabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The processor resource name to be disabled. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The processor resource name to be disabled. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DisableProcessorResponse.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DisableProcessorResponse.php deleted file mode 100644 index 278181ba2090..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DisableProcessorResponse.php +++ /dev/null @@ -1,35 +0,0 @@ -google.cloud.documentai.v1.DisableProcessorResponse - */ -class DisableProcessorResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document.php deleted file mode 100644 index 6f653d93fea5..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document.php +++ /dev/null @@ -1,835 +0,0 @@ -google.cloud.documentai.v1.Document - */ -class Document extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. An internal identifier for document. Should be loggable (no PII). - * - * Generated from protobuf field string docid = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $docid = ''; - /** - * An IANA published [media type (MIME - * type)](https://www.iana.org/assignments/media-types/media-types.xhtml). - * - * Generated from protobuf field string mime_type = 3; - */ - protected $mime_type = ''; - /** - * Optional. UTF-8 encoded text in reading order from the document. - * - * Generated from protobuf field string text = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $text = ''; - /** - * Styles for the [Document.text][google.cloud.documentai.v1.Document.text]. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Style text_styles = 5 [deprecated = true]; - * @deprecated - */ - private $text_styles; - /** - * Visual page layout for the [Document][google.cloud.documentai.v1.Document]. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page pages = 6; - */ - private $pages; - /** - * A list of entities detected on - * [Document.text][google.cloud.documentai.v1.Document.text]. For document - * shards, entities in this list may cross shard boundaries. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity entities = 7; - */ - private $entities; - /** - * Placeholder. Relationship among - * [Document.entities][google.cloud.documentai.v1.Document.entities]. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.EntityRelation entity_relations = 8; - */ - private $entity_relations; - /** - * Placeholder. A list of text corrections made to - * [Document.text][google.cloud.documentai.v1.Document.text]. This is usually - * used for annotating corrections to OCR mistakes. Text changes for a given - * revision may not overlap with each other. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.TextChange text_changes = 14; - */ - private $text_changes; - /** - * Information about the sharding if this document is sharded part of a larger - * document. If the document is not sharded, this message is not specified. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.ShardInfo shard_info = 9; - */ - protected $shard_info = null; - /** - * Any error that occurred while processing this document. - * - * Generated from protobuf field .google.rpc.Status error = 10; - */ - protected $error = null; - /** - * Placeholder. Revision history of this document. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Revision revisions = 13; - */ - private $revisions; - /** - * Parsed layout of the document. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.DocumentLayout document_layout = 17; - */ - protected $document_layout = null; - /** - * Document chunked based on chunking config. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.ChunkedDocument chunked_document = 18; - */ - protected $chunked_document = null; - /** - * Optional. The blob assets in this document. This is used to store the - * content of the inline blobs in this document, for example, image bytes, - * such that it can be referenced by other fields in the document via asset - * id. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $blob_assets; - /** - * The entity validation output for the document. This is the validation - * output for `document.entities` field. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.EntityValidationOutput entity_validation_output = 21; - */ - protected $entity_validation_output = null; - /** - * A list of entity revisions. The entity revisions are appended to the - * document in the processing order. This field can be used for comparing the - * entity extraction results at different stages of the processing. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.EntitiesRevision entities_revisions = 22; - */ - private $entities_revisions; - /** - * The entity revision ID that `document.entities` field is based on. - * If this field is set and `entities_revisions` is not empty, the entities in - * `document.entities` field are the entities in the entity revision with this - * id and `document.entity_validation_output` field is the - * `entity_validation_output` field in this entity revision. - * - * Generated from protobuf field string entities_revision_id = 23; - */ - protected $entities_revision_id = ''; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * Optional. Currently supports Google Cloud Storage URI of the form - * `gs://bucket_name/object_name`. Object versioning is not supported. - * For more information, refer to [Google Cloud Storage Request - * URIs](https://cloud.google.com/storage/docs/reference-uris). - * @type string $content - * Optional. Inline document content, represented as a stream of bytes. - * Note: As with all `bytes` fields, protobuffers use a pure binary - * representation, whereas JSON representations use base64. - * @type string $docid - * Optional. An internal identifier for document. Should be loggable (no PII). - * @type string $mime_type - * An IANA published [media type (MIME - * type)](https://www.iana.org/assignments/media-types/media-types.xhtml). - * @type string $text - * Optional. UTF-8 encoded text in reading order from the document. - * @type \Google\Cloud\DocumentAI\V1\Document\Style[] $text_styles - * Styles for the [Document.text][google.cloud.documentai.v1.Document.text]. - * @type \Google\Cloud\DocumentAI\V1\Document\Page[] $pages - * Visual page layout for the [Document][google.cloud.documentai.v1.Document]. - * @type \Google\Cloud\DocumentAI\V1\Document\Entity[] $entities - * A list of entities detected on - * [Document.text][google.cloud.documentai.v1.Document.text]. For document - * shards, entities in this list may cross shard boundaries. - * @type \Google\Cloud\DocumentAI\V1\Document\EntityRelation[] $entity_relations - * Placeholder. Relationship among - * [Document.entities][google.cloud.documentai.v1.Document.entities]. - * @type \Google\Cloud\DocumentAI\V1\Document\TextChange[] $text_changes - * Placeholder. A list of text corrections made to - * [Document.text][google.cloud.documentai.v1.Document.text]. This is usually - * used for annotating corrections to OCR mistakes. Text changes for a given - * revision may not overlap with each other. - * @type \Google\Cloud\DocumentAI\V1\Document\ShardInfo $shard_info - * Information about the sharding if this document is sharded part of a larger - * document. If the document is not sharded, this message is not specified. - * @type \Google\Rpc\Status $error - * Any error that occurred while processing this document. - * @type \Google\Cloud\DocumentAI\V1\Document\Revision[] $revisions - * Placeholder. Revision history of this document. - * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout $document_layout - * Parsed layout of the document. - * @type \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument $chunked_document - * Document chunked based on chunking config. - * @type \Google\Cloud\DocumentAI\V1\Document\BlobAsset[] $blob_assets - * Optional. The blob assets in this document. This is used to store the - * content of the inline blobs in this document, for example, image bytes, - * such that it can be referenced by other fields in the document via asset - * id. - * @type \Google\Cloud\DocumentAI\V1\Document\EntityValidationOutput $entity_validation_output - * The entity validation output for the document. This is the validation - * output for `document.entities` field. - * @type \Google\Cloud\DocumentAI\V1\Document\EntitiesRevision[] $entities_revisions - * A list of entity revisions. The entity revisions are appended to the - * document in the processing order. This field can be used for comparing the - * entity extraction results at different stages of the processing. - * @type string $entities_revision_id - * The entity revision ID that `document.entities` field is based on. - * If this field is set and `entities_revisions` is not empty, the entities in - * `document.entities` field are the entities in the entity revision with this - * id and `document.entity_validation_output` field is the - * `entity_validation_output` field in this entity revision. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Currently supports Google Cloud Storage URI of the form - * `gs://bucket_name/object_name`. Object versioning is not supported. - * For more information, refer to [Google Cloud Storage Request - * URIs](https://cloud.google.com/storage/docs/reference-uris). - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getUri() - { - return $this->readOneof(1); - } - - public function hasUri() - { - return $this->hasOneof(1); - } - - /** - * Optional. Currently supports Google Cloud Storage URI of the form - * `gs://bucket_name/object_name`. Object versioning is not supported. - * For more information, refer to [Google Cloud Storage Request - * URIs](https://cloud.google.com/storage/docs/reference-uris). - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Optional. Inline document content, represented as a stream of bytes. - * Note: As with all `bytes` fields, protobuffers use a pure binary - * representation, whereas JSON representations use base64. - * - * Generated from protobuf field bytes content = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getContent() - { - return $this->readOneof(2); - } - - public function hasContent() - { - return $this->hasOneof(2); - } - - /** - * Optional. Inline document content, represented as a stream of bytes. - * Note: As with all `bytes` fields, protobuffers use a pure binary - * representation, whereas JSON representations use base64. - * - * Generated from protobuf field bytes content = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Optional. An internal identifier for document. Should be loggable (no PII). - * - * Generated from protobuf field string docid = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDocid() - { - return $this->docid; - } - - /** - * Optional. An internal identifier for document. Should be loggable (no PII). - * - * Generated from protobuf field string docid = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDocid($var) - { - GPBUtil::checkString($var, True); - $this->docid = $var; - - return $this; - } - - /** - * An IANA published [media type (MIME - * type)](https://www.iana.org/assignments/media-types/media-types.xhtml). - * - * Generated from protobuf field string mime_type = 3; - * @return string - */ - public function getMimeType() - { - return $this->mime_type; - } - - /** - * An IANA published [media type (MIME - * type)](https://www.iana.org/assignments/media-types/media-types.xhtml). - * - * Generated from protobuf field string mime_type = 3; - * @param string $var - * @return $this - */ - public function setMimeType($var) - { - GPBUtil::checkString($var, True); - $this->mime_type = $var; - - return $this; - } - - /** - * Optional. UTF-8 encoded text in reading order from the document. - * - * Generated from protobuf field string text = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * Optional. UTF-8 encoded text in reading order from the document. - * - * Generated from protobuf field string text = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->text = $var; - - return $this; - } - - /** - * Styles for the [Document.text][google.cloud.documentai.v1.Document.text]. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Style text_styles = 5 [deprecated = true]; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Style> - * @deprecated - */ - public function getTextStyles() - { - if ($this->text_styles->count() !== 0) { - @trigger_error('text_styles is deprecated.', E_USER_DEPRECATED); - } - return $this->text_styles; - } - - /** - * Styles for the [Document.text][google.cloud.documentai.v1.Document.text]. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Style text_styles = 5 [deprecated = true]; - * @param \Google\Cloud\DocumentAI\V1\Document\Style[] $var - * @return $this - * @deprecated - */ - public function setTextStyles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Style::class); - if ($arr->count() !== 0) { - @trigger_error('text_styles is deprecated.', E_USER_DEPRECATED); - } - $this->text_styles = $arr; - - return $this; - } - - /** - * Visual page layout for the [Document][google.cloud.documentai.v1.Document]. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page pages = 6; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page> - */ - public function getPages() - { - return $this->pages; - } - - /** - * Visual page layout for the [Document][google.cloud.documentai.v1.Document]. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page pages = 6; - * @param \Google\Cloud\DocumentAI\V1\Document\Page[] $var - * @return $this - */ - public function setPages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page::class); - $this->pages = $arr; - - return $this; - } - - /** - * A list of entities detected on - * [Document.text][google.cloud.documentai.v1.Document.text]. For document - * shards, entities in this list may cross shard boundaries. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity entities = 7; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Entity> - */ - public function getEntities() - { - return $this->entities; - } - - /** - * A list of entities detected on - * [Document.text][google.cloud.documentai.v1.Document.text]. For document - * shards, entities in this list may cross shard boundaries. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity entities = 7; - * @param \Google\Cloud\DocumentAI\V1\Document\Entity[] $var - * @return $this - */ - public function setEntities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Entity::class); - $this->entities = $arr; - - return $this; - } - - /** - * Placeholder. Relationship among - * [Document.entities][google.cloud.documentai.v1.Document.entities]. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.EntityRelation entity_relations = 8; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\EntityRelation> - */ - public function getEntityRelations() - { - return $this->entity_relations; - } - - /** - * Placeholder. Relationship among - * [Document.entities][google.cloud.documentai.v1.Document.entities]. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.EntityRelation entity_relations = 8; - * @param \Google\Cloud\DocumentAI\V1\Document\EntityRelation[] $var - * @return $this - */ - public function setEntityRelations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\EntityRelation::class); - $this->entity_relations = $arr; - - return $this; - } - - /** - * Placeholder. A list of text corrections made to - * [Document.text][google.cloud.documentai.v1.Document.text]. This is usually - * used for annotating corrections to OCR mistakes. Text changes for a given - * revision may not overlap with each other. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.TextChange text_changes = 14; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\TextChange> - */ - public function getTextChanges() - { - return $this->text_changes; - } - - /** - * Placeholder. A list of text corrections made to - * [Document.text][google.cloud.documentai.v1.Document.text]. This is usually - * used for annotating corrections to OCR mistakes. Text changes for a given - * revision may not overlap with each other. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.TextChange text_changes = 14; - * @param \Google\Cloud\DocumentAI\V1\Document\TextChange[] $var - * @return $this - */ - public function setTextChanges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\TextChange::class); - $this->text_changes = $arr; - - return $this; - } - - /** - * Information about the sharding if this document is sharded part of a larger - * document. If the document is not sharded, this message is not specified. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.ShardInfo shard_info = 9; - * @return \Google\Cloud\DocumentAI\V1\Document\ShardInfo|null - */ - public function getShardInfo() - { - return $this->shard_info; - } - - public function hasShardInfo() - { - return isset($this->shard_info); - } - - public function clearShardInfo() - { - unset($this->shard_info); - } - - /** - * Information about the sharding if this document is sharded part of a larger - * document. If the document is not sharded, this message is not specified. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.ShardInfo shard_info = 9; - * @param \Google\Cloud\DocumentAI\V1\Document\ShardInfo $var - * @return $this - */ - public function setShardInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\ShardInfo::class); - $this->shard_info = $var; - - return $this; - } - - /** - * Any error that occurred while processing this document. - * - * Generated from protobuf field .google.rpc.Status error = 10; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Any error that occurred while processing this document. - * - * Generated from protobuf field .google.rpc.Status error = 10; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - - /** - * Placeholder. Revision history of this document. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Revision revisions = 13; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Revision> - */ - public function getRevisions() - { - return $this->revisions; - } - - /** - * Placeholder. Revision history of this document. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Revision revisions = 13; - * @param \Google\Cloud\DocumentAI\V1\Document\Revision[] $var - * @return $this - */ - public function setRevisions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Revision::class); - $this->revisions = $arr; - - return $this; - } - - /** - * Parsed layout of the document. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.DocumentLayout document_layout = 17; - * @return \Google\Cloud\DocumentAI\V1\Document\DocumentLayout|null - */ - public function getDocumentLayout() - { - return $this->document_layout; - } - - public function hasDocumentLayout() - { - return isset($this->document_layout); - } - - public function clearDocumentLayout() - { - unset($this->document_layout); - } - - /** - * Parsed layout of the document. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.DocumentLayout document_layout = 17; - * @param \Google\Cloud\DocumentAI\V1\Document\DocumentLayout $var - * @return $this - */ - public function setDocumentLayout($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\DocumentLayout::class); - $this->document_layout = $var; - - return $this; - } - - /** - * Document chunked based on chunking config. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.ChunkedDocument chunked_document = 18; - * @return \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument|null - */ - public function getChunkedDocument() - { - return $this->chunked_document; - } - - public function hasChunkedDocument() - { - return isset($this->chunked_document); - } - - public function clearChunkedDocument() - { - unset($this->chunked_document); - } - - /** - * Document chunked based on chunking config. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.ChunkedDocument chunked_document = 18; - * @param \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument $var - * @return $this - */ - public function setChunkedDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument::class); - $this->chunked_document = $var; - - return $this; - } - - /** - * Optional. The blob assets in this document. This is used to store the - * content of the inline blobs in this document, for example, image bytes, - * such that it can be referenced by other fields in the document via asset - * id. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\BlobAsset> - */ - public function getBlobAssets() - { - return $this->blob_assets; - } - - /** - * Optional. The blob assets in this document. This is used to store the - * content of the inline blobs in this document, for example, image bytes, - * such that it can be referenced by other fields in the document via asset - * id. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\DocumentAI\V1\Document\BlobAsset[] $var - * @return $this - */ - public function setBlobAssets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\BlobAsset::class); - $this->blob_assets = $arr; - - return $this; - } - - /** - * The entity validation output for the document. This is the validation - * output for `document.entities` field. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.EntityValidationOutput entity_validation_output = 21; - * @return \Google\Cloud\DocumentAI\V1\Document\EntityValidationOutput|null - */ - public function getEntityValidationOutput() - { - return $this->entity_validation_output; - } - - public function hasEntityValidationOutput() - { - return isset($this->entity_validation_output); - } - - public function clearEntityValidationOutput() - { - unset($this->entity_validation_output); - } - - /** - * The entity validation output for the document. This is the validation - * output for `document.entities` field. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.EntityValidationOutput entity_validation_output = 21; - * @param \Google\Cloud\DocumentAI\V1\Document\EntityValidationOutput $var - * @return $this - */ - public function setEntityValidationOutput($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\EntityValidationOutput::class); - $this->entity_validation_output = $var; - - return $this; - } - - /** - * A list of entity revisions. The entity revisions are appended to the - * document in the processing order. This field can be used for comparing the - * entity extraction results at different stages of the processing. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.EntitiesRevision entities_revisions = 22; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\EntitiesRevision> - */ - public function getEntitiesRevisions() - { - return $this->entities_revisions; - } - - /** - * A list of entity revisions. The entity revisions are appended to the - * document in the processing order. This field can be used for comparing the - * entity extraction results at different stages of the processing. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.EntitiesRevision entities_revisions = 22; - * @param \Google\Cloud\DocumentAI\V1\Document\EntitiesRevision[] $var - * @return $this - */ - public function setEntitiesRevisions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\EntitiesRevision::class); - $this->entities_revisions = $arr; - - return $this; - } - - /** - * The entity revision ID that `document.entities` field is based on. - * If this field is set and `entities_revisions` is not empty, the entities in - * `document.entities` field are the entities in the entity revision with this - * id and `document.entity_validation_output` field is the - * `entity_validation_output` field in this entity revision. - * - * Generated from protobuf field string entities_revision_id = 23; - * @return string - */ - public function getEntitiesRevisionId() - { - return $this->entities_revision_id; - } - - /** - * The entity revision ID that `document.entities` field is based on. - * If this field is set and `entities_revisions` is not empty, the entities in - * `document.entities` field are the entities in the entity revision with this - * id and `document.entity_validation_output` field is the - * `entity_validation_output` field in this entity revision. - * - * Generated from protobuf field string entities_revision_id = 23; - * @param string $var - * @return $this - */ - public function setEntitiesRevisionId($var) - { - GPBUtil::checkString($var, True); - $this->entities_revision_id = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument.php deleted file mode 100644 index ba3142b07029..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.documentai.v1.Document.ChunkedDocument - */ -class ChunkedDocument extends \Google\Protobuf\Internal\Message -{ - /** - * List of chunks. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; - */ - private $chunks; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk[] $chunks - * List of chunks. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * List of chunks. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk> - */ - public function getChunks() - { - return $this->chunks; - } - - /** - * List of chunks. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; - * @param \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk[] $var - * @return $this - */ - public function setChunks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk::class); - $this->chunks = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk.php deleted file mode 100644 index 5823a992d478..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk.php +++ /dev/null @@ -1,281 +0,0 @@ -google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - */ -class Chunk extends \Google\Protobuf\Internal\Message -{ - /** - * ID of the chunk. - * - * Generated from protobuf field string chunk_id = 1; - */ - protected $chunk_id = ''; - /** - * Unused. - * - * Generated from protobuf field repeated string source_block_ids = 2; - */ - private $source_block_ids; - /** - * Text content of the chunk. - * - * Generated from protobuf field string content = 3; - */ - protected $content = ''; - /** - * Page span of the chunk. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; - */ - protected $page_span = null; - /** - * Page headers associated with the chunk. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; - */ - private $page_headers; - /** - * Page footers associated with the chunk. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; - */ - private $page_footers; - /** - * Chunk fields inside this chunk. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; - */ - private $chunk_fields; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $chunk_id - * ID of the chunk. - * @type string[] $source_block_ids - * Unused. - * @type string $content - * Text content of the chunk. - * @type \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageSpan $page_span - * Page span of the chunk. - * @type \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageHeader[] $page_headers - * Page headers associated with the chunk. - * @type \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageFooter[] $page_footers - * Page footers associated with the chunk. - * @type \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkField[] $chunk_fields - * Chunk fields inside this chunk. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * ID of the chunk. - * - * Generated from protobuf field string chunk_id = 1; - * @return string - */ - public function getChunkId() - { - return $this->chunk_id; - } - - /** - * ID of the chunk. - * - * Generated from protobuf field string chunk_id = 1; - * @param string $var - * @return $this - */ - public function setChunkId($var) - { - GPBUtil::checkString($var, True); - $this->chunk_id = $var; - - return $this; - } - - /** - * Unused. - * - * Generated from protobuf field repeated string source_block_ids = 2; - * @return RepeatedField - */ - public function getSourceBlockIds() - { - return $this->source_block_ids; - } - - /** - * Unused. - * - * Generated from protobuf field repeated string source_block_ids = 2; - * @param string[] $var - * @return $this - */ - public function setSourceBlockIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->source_block_ids = $arr; - - return $this; - } - - /** - * Text content of the chunk. - * - * Generated from protobuf field string content = 3; - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * Text content of the chunk. - * - * Generated from protobuf field string content = 3; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, True); - $this->content = $var; - - return $this; - } - - /** - * Page span of the chunk. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; - * @return \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageSpan|null - */ - public function getPageSpan() - { - return $this->page_span; - } - - public function hasPageSpan() - { - return isset($this->page_span); - } - - public function clearPageSpan() - { - unset($this->page_span); - } - - /** - * Page span of the chunk. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; - * @param \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageSpan $var - * @return $this - */ - public function setPageSpan($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageSpan::class); - $this->page_span = $var; - - return $this; - } - - /** - * Page headers associated with the chunk. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageHeader> - */ - public function getPageHeaders() - { - return $this->page_headers; - } - - /** - * Page headers associated with the chunk. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; - * @param \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageHeader[] $var - * @return $this - */ - public function setPageHeaders($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageHeader::class); - $this->page_headers = $arr; - - return $this; - } - - /** - * Page footers associated with the chunk. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageFooter> - */ - public function getPageFooters() - { - return $this->page_footers; - } - - /** - * Page footers associated with the chunk. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; - * @param \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageFooter[] $var - * @return $this - */ - public function setPageFooters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageFooter::class); - $this->page_footers = $arr; - - return $this; - } - - /** - * Chunk fields inside this chunk. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkField> - */ - public function getChunkFields() - { - return $this->chunk_fields; - } - - /** - * Chunk fields inside this chunk. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; - * @param \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkField[] $var - * @return $this - */ - public function setChunkFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkField::class); - $this->chunk_fields = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ChunkPageFooter.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ChunkPageFooter.php deleted file mode 100644 index 789640d2ea4a..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ChunkPageFooter.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - */ -class ChunkPageFooter extends \Google\Protobuf\Internal\Message -{ - /** - * Footer in text format. - * - * Generated from protobuf field string text = 1; - */ - protected $text = ''; - /** - * Page span of the footer. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; - */ - protected $page_span = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $text - * Footer in text format. - * @type \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageSpan $page_span - * Page span of the footer. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Footer in text format. - * - * Generated from protobuf field string text = 1; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * Footer in text format. - * - * Generated from protobuf field string text = 1; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->text = $var; - - return $this; - } - - /** - * Page span of the footer. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; - * @return \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageSpan|null - */ - public function getPageSpan() - { - return $this->page_span; - } - - public function hasPageSpan() - { - return isset($this->page_span); - } - - public function clearPageSpan() - { - unset($this->page_span); - } - - /** - * Page span of the footer. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; - * @param \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageSpan $var - * @return $this - */ - public function setPageSpan($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageSpan::class); - $this->page_span = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ChunkPageHeader.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ChunkPageHeader.php deleted file mode 100644 index 867bbec7fa58..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ChunkPageHeader.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - */ -class ChunkPageHeader extends \Google\Protobuf\Internal\Message -{ - /** - * Header in text format. - * - * Generated from protobuf field string text = 1; - */ - protected $text = ''; - /** - * Page span of the header. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; - */ - protected $page_span = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $text - * Header in text format. - * @type \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageSpan $page_span - * Page span of the header. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Header in text format. - * - * Generated from protobuf field string text = 1; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * Header in text format. - * - * Generated from protobuf field string text = 1; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->text = $var; - - return $this; - } - - /** - * Page span of the header. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; - * @return \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageSpan|null - */ - public function getPageSpan() - { - return $this->page_span; - } - - public function hasPageSpan() - { - return isset($this->page_span); - } - - public function clearPageSpan() - { - unset($this->page_span); - } - - /** - * Page span of the header. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; - * @param \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageSpan $var - * @return $this - */ - public function setPageSpan($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk\ChunkPageSpan::class); - $this->page_span = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ChunkPageSpan.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ChunkPageSpan.php deleted file mode 100644 index 97e30124c284..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ChunkedDocument/Chunk/ChunkPageSpan.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - */ -class ChunkPageSpan extends \Google\Protobuf\Internal\Message -{ - /** - * Page where chunk starts in the document. - * - * Generated from protobuf field int32 page_start = 1; - */ - protected $page_start = 0; - /** - * Page where chunk ends in the document. - * - * Generated from protobuf field int32 page_end = 2; - */ - protected $page_end = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $page_start - * Page where chunk starts in the document. - * @type int $page_end - * Page where chunk ends in the document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Page where chunk starts in the document. - * - * Generated from protobuf field int32 page_start = 1; - * @return int - */ - public function getPageStart() - { - return $this->page_start; - } - - /** - * Page where chunk starts in the document. - * - * Generated from protobuf field int32 page_start = 1; - * @param int $var - * @return $this - */ - public function setPageStart($var) - { - GPBUtil::checkInt32($var); - $this->page_start = $var; - - return $this; - } - - /** - * Page where chunk ends in the document. - * - * Generated from protobuf field int32 page_end = 2; - * @return int - */ - public function getPageEnd() - { - return $this->page_end; - } - - /** - * Page where chunk ends in the document. - * - * Generated from protobuf field int32 page_end = 2; - * @param int $var - * @return $this - */ - public function setPageEnd($var) - { - GPBUtil::checkInt32($var); - $this->page_end = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout.php deleted file mode 100644 index 9fd0ec72acae..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.documentai.v1.Document.DocumentLayout - */ -class DocumentLayout extends \Google\Protobuf\Internal\Message -{ - /** - * List of blocks in the document. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - */ - private $blocks; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock[] $blocks - * List of blocks in the document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * List of blocks in the document. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock> - */ - public function getBlocks() - { - return $this->blocks; - } - - /** - * List of blocks in the document. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * @param \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock[] $var - * @return $this - */ - public function setBlocks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock::class); - $this->blocks = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock.php deleted file mode 100644 index a1a42fb47bc6..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock.php +++ /dev/null @@ -1,297 +0,0 @@ -google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - */ -class DocumentLayoutBlock extends \Google\Protobuf\Internal\Message -{ - /** - * ID of the block. - * - * Generated from protobuf field string block_id = 1; - */ - protected $block_id = ''; - /** - * Page span of the block. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; - */ - protected $page_span = null; - /** - * Identifies the bounding box for the block. - * - * Generated from protobuf field .google.cloud.documentai.v1.BoundingPoly bounding_box = 6; - */ - protected $bounding_box = null; - protected $block; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTextBlock $text_block - * Block consisting of text content. - * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableBlock $table_block - * Block consisting of table content/structure. - * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutListBlock $list_block - * Block consisting of list content/structure. - * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutImageBlock $image_block - * Block consisting of image content. - * @type string $block_id - * ID of the block. - * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutPageSpan $page_span - * Page span of the block. - * @type \Google\Cloud\DocumentAI\V1\BoundingPoly $bounding_box - * Identifies the bounding box for the block. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Block consisting of text content. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; - * @return \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTextBlock|null - */ - public function getTextBlock() - { - return $this->readOneof(2); - } - - public function hasTextBlock() - { - return $this->hasOneof(2); - } - - /** - * Block consisting of text content. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; - * @param \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTextBlock $var - * @return $this - */ - public function setTextBlock($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTextBlock::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Block consisting of table content/structure. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; - * @return \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableBlock|null - */ - public function getTableBlock() - { - return $this->readOneof(3); - } - - public function hasTableBlock() - { - return $this->hasOneof(3); - } - - /** - * Block consisting of table content/structure. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; - * @param \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableBlock $var - * @return $this - */ - public function setTableBlock($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableBlock::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Block consisting of list content/structure. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; - * @return \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutListBlock|null - */ - public function getListBlock() - { - return $this->readOneof(4); - } - - public function hasListBlock() - { - return $this->hasOneof(4); - } - - /** - * Block consisting of list content/structure. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; - * @param \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutListBlock $var - * @return $this - */ - public function setListBlock($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutListBlock::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Block consisting of image content. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock image_block = 7; - * @return \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutImageBlock|null - */ - public function getImageBlock() - { - return $this->readOneof(7); - } - - public function hasImageBlock() - { - return $this->hasOneof(7); - } - - /** - * Block consisting of image content. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock image_block = 7; - * @param \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutImageBlock $var - * @return $this - */ - public function setImageBlock($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutImageBlock::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * ID of the block. - * - * Generated from protobuf field string block_id = 1; - * @return string - */ - public function getBlockId() - { - return $this->block_id; - } - - /** - * ID of the block. - * - * Generated from protobuf field string block_id = 1; - * @param string $var - * @return $this - */ - public function setBlockId($var) - { - GPBUtil::checkString($var, True); - $this->block_id = $var; - - return $this; - } - - /** - * Page span of the block. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; - * @return \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutPageSpan|null - */ - public function getPageSpan() - { - return $this->page_span; - } - - public function hasPageSpan() - { - return isset($this->page_span); - } - - public function clearPageSpan() - { - unset($this->page_span); - } - - /** - * Page span of the block. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; - * @param \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutPageSpan $var - * @return $this - */ - public function setPageSpan($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutPageSpan::class); - $this->page_span = $var; - - return $this; - } - - /** - * Identifies the bounding box for the block. - * - * Generated from protobuf field .google.cloud.documentai.v1.BoundingPoly bounding_box = 6; - * @return \Google\Cloud\DocumentAI\V1\BoundingPoly|null - */ - public function getBoundingBox() - { - return $this->bounding_box; - } - - public function hasBoundingBox() - { - return isset($this->bounding_box); - } - - public function clearBoundingBox() - { - unset($this->bounding_box); - } - - /** - * Identifies the bounding box for the block. - * - * Generated from protobuf field .google.cloud.documentai.v1.BoundingPoly bounding_box = 6; - * @param \Google\Cloud\DocumentAI\V1\BoundingPoly $var - * @return $this - */ - public function setBoundingBox($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\BoundingPoly::class); - $this->bounding_box = $var; - - return $this; - } - - /** - * @return string - */ - public function getBlock() - { - return $this->whichOneof("block"); - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutListBlock.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutListBlock.php deleted file mode 100644 index e9bc8f8b92af..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutListBlock.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock - */ -class LayoutListBlock extends \Google\Protobuf\Internal\Message -{ - /** - * List entries that constitute a list block. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; - */ - private $list_entries; - /** - * Type of the list_entries (if exist). Available options are `ordered` - * and `unordered`. - * - * Generated from protobuf field string type = 2; - */ - protected $type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutListEntry[] $list_entries - * List entries that constitute a list block. - * @type string $type - * Type of the list_entries (if exist). Available options are `ordered` - * and `unordered`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * List entries that constitute a list block. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutListEntry> - */ - public function getListEntries() - { - return $this->list_entries; - } - - /** - * List entries that constitute a list block. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; - * @param \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutListEntry[] $var - * @return $this - */ - public function setListEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutListEntry::class); - $this->list_entries = $arr; - - return $this; - } - - /** - * Type of the list_entries (if exist). Available options are `ordered` - * and `unordered`. - * - * Generated from protobuf field string type = 2; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Type of the list_entries (if exist). Available options are `ordered` - * and `unordered`. - * - * Generated from protobuf field string type = 2; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutListEntry.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutListEntry.php deleted file mode 100644 index 5c7a9af390e9..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutListEntry.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry - */ -class LayoutListEntry extends \Google\Protobuf\Internal\Message -{ - /** - * A list entry is a list of blocks. - * Repeated blocks support further hierarchies and nested blocks. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - */ - private $blocks; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock[] $blocks - * A list entry is a list of blocks. - * Repeated blocks support further hierarchies and nested blocks. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * A list entry is a list of blocks. - * Repeated blocks support further hierarchies and nested blocks. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock> - */ - public function getBlocks() - { - return $this->blocks; - } - - /** - * A list entry is a list of blocks. - * Repeated blocks support further hierarchies and nested blocks. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * @param \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock[] $var - * @return $this - */ - public function setBlocks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock::class); - $this->blocks = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutPageSpan.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutPageSpan.php deleted file mode 100644 index 51aa9b02c19e..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutPageSpan.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan - */ -class LayoutPageSpan extends \Google\Protobuf\Internal\Message -{ - /** - * Page where block starts in the document. - * - * Generated from protobuf field int32 page_start = 1; - */ - protected $page_start = 0; - /** - * Page where block ends in the document. - * - * Generated from protobuf field int32 page_end = 2; - */ - protected $page_end = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $page_start - * Page where block starts in the document. - * @type int $page_end - * Page where block ends in the document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Page where block starts in the document. - * - * Generated from protobuf field int32 page_start = 1; - * @return int - */ - public function getPageStart() - { - return $this->page_start; - } - - /** - * Page where block starts in the document. - * - * Generated from protobuf field int32 page_start = 1; - * @param int $var - * @return $this - */ - public function setPageStart($var) - { - GPBUtil::checkInt32($var); - $this->page_start = $var; - - return $this; - } - - /** - * Page where block ends in the document. - * - * Generated from protobuf field int32 page_end = 2; - * @return int - */ - public function getPageEnd() - { - return $this->page_end; - } - - /** - * Page where block ends in the document. - * - * Generated from protobuf field int32 page_end = 2; - * @param int $var - * @return $this - */ - public function setPageEnd($var) - { - GPBUtil::checkInt32($var); - $this->page_end = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTableBlock.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTableBlock.php deleted file mode 100644 index ca77f5876611..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTableBlock.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock - */ -class LayoutTableBlock extends \Google\Protobuf\Internal\Message -{ - /** - * Header rows at the top of the table. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; - */ - private $header_rows; - /** - * Body rows containing main table content. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; - */ - private $body_rows; - /** - * Table caption/title. - * - * Generated from protobuf field string caption = 3; - */ - protected $caption = ''; - /** - * Annotation of the table block. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Annotations annotations = 4; - */ - protected $annotations = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableRow[] $header_rows - * Header rows at the top of the table. - * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableRow[] $body_rows - * Body rows containing main table content. - * @type string $caption - * Table caption/title. - * @type \Google\Cloud\DocumentAI\V1\Document\Annotations $annotations - * Annotation of the table block. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Header rows at the top of the table. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableRow> - */ - public function getHeaderRows() - { - return $this->header_rows; - } - - /** - * Header rows at the top of the table. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; - * @param \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableRow[] $var - * @return $this - */ - public function setHeaderRows($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableRow::class); - $this->header_rows = $arr; - - return $this; - } - - /** - * Body rows containing main table content. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableRow> - */ - public function getBodyRows() - { - return $this->body_rows; - } - - /** - * Body rows containing main table content. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; - * @param \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableRow[] $var - * @return $this - */ - public function setBodyRows($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableRow::class); - $this->body_rows = $arr; - - return $this; - } - - /** - * Table caption/title. - * - * Generated from protobuf field string caption = 3; - * @return string - */ - public function getCaption() - { - return $this->caption; - } - - /** - * Table caption/title. - * - * Generated from protobuf field string caption = 3; - * @param string $var - * @return $this - */ - public function setCaption($var) - { - GPBUtil::checkString($var, True); - $this->caption = $var; - - return $this; - } - - /** - * Annotation of the table block. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Annotations annotations = 4; - * @return \Google\Cloud\DocumentAI\V1\Document\Annotations|null - */ - public function getAnnotations() - { - return $this->annotations; - } - - public function hasAnnotations() - { - return isset($this->annotations); - } - - public function clearAnnotations() - { - unset($this->annotations); - } - - /** - * Annotation of the table block. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Annotations annotations = 4; - * @param \Google\Cloud\DocumentAI\V1\Document\Annotations $var - * @return $this - */ - public function setAnnotations($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Annotations::class); - $this->annotations = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTableCell.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTableCell.php deleted file mode 100644 index 97505547be14..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTableCell.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell - */ -class LayoutTableCell extends \Google\Protobuf\Internal\Message -{ - /** - * A table cell is a list of blocks. - * Repeated blocks support further hierarchies and nested blocks. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - */ - private $blocks; - /** - * How many rows this cell spans. - * - * Generated from protobuf field int32 row_span = 2; - */ - protected $row_span = 0; - /** - * How many columns this cell spans. - * - * Generated from protobuf field int32 col_span = 3; - */ - protected $col_span = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock[] $blocks - * A table cell is a list of blocks. - * Repeated blocks support further hierarchies and nested blocks. - * @type int $row_span - * How many rows this cell spans. - * @type int $col_span - * How many columns this cell spans. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * A table cell is a list of blocks. - * Repeated blocks support further hierarchies and nested blocks. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock> - */ - public function getBlocks() - { - return $this->blocks; - } - - /** - * A table cell is a list of blocks. - * Repeated blocks support further hierarchies and nested blocks. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * @param \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock[] $var - * @return $this - */ - public function setBlocks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock::class); - $this->blocks = $arr; - - return $this; - } - - /** - * How many rows this cell spans. - * - * Generated from protobuf field int32 row_span = 2; - * @return int - */ - public function getRowSpan() - { - return $this->row_span; - } - - /** - * How many rows this cell spans. - * - * Generated from protobuf field int32 row_span = 2; - * @param int $var - * @return $this - */ - public function setRowSpan($var) - { - GPBUtil::checkInt32($var); - $this->row_span = $var; - - return $this; - } - - /** - * How many columns this cell spans. - * - * Generated from protobuf field int32 col_span = 3; - * @return int - */ - public function getColSpan() - { - return $this->col_span; - } - - /** - * How many columns this cell spans. - * - * Generated from protobuf field int32 col_span = 3; - * @param int $var - * @return $this - */ - public function setColSpan($var) - { - GPBUtil::checkInt32($var); - $this->col_span = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTableRow.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTableRow.php deleted file mode 100644 index 24a87501ec66..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTableRow.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow - */ -class LayoutTableRow extends \Google\Protobuf\Internal\Message -{ - /** - * A table row is a list of table cells. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; - */ - private $cells; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableCell[] $cells - * A table row is a list of table cells. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * A table row is a list of table cells. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableCell> - */ - public function getCells() - { - return $this->cells; - } - - /** - * A table row is a list of table cells. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; - * @param \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableCell[] $var - * @return $this - */ - public function setCells($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock\LayoutTableCell::class); - $this->cells = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTextBlock.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTextBlock.php deleted file mode 100644 index ca3cc05bb93d..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/DocumentLayout/DocumentLayoutBlock/LayoutTextBlock.php +++ /dev/null @@ -1,191 +0,0 @@ -google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock - */ -class LayoutTextBlock extends \Google\Protobuf\Internal\Message -{ - /** - * Text content stored in the block. - * - * Generated from protobuf field string text = 1; - */ - protected $text = ''; - /** - * Type of the text in the block. Available options are: `paragraph`, - * `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, - * `heading-5`, `header`, `footer`. - * - * Generated from protobuf field string type = 2; - */ - protected $type = ''; - /** - * A text block could further have child blocks. - * Repeated blocks support further hierarchies and nested blocks. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; - */ - private $blocks; - /** - * Annotation of the text block. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Annotations annotations = 4; - */ - protected $annotations = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $text - * Text content stored in the block. - * @type string $type - * Type of the text in the block. Available options are: `paragraph`, - * `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, - * `heading-5`, `header`, `footer`. - * @type \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock[] $blocks - * A text block could further have child blocks. - * Repeated blocks support further hierarchies and nested blocks. - * @type \Google\Cloud\DocumentAI\V1\Document\Annotations $annotations - * Annotation of the text block. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Text content stored in the block. - * - * Generated from protobuf field string text = 1; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * Text content stored in the block. - * - * Generated from protobuf field string text = 1; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->text = $var; - - return $this; - } - - /** - * Type of the text in the block. Available options are: `paragraph`, - * `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, - * `heading-5`, `header`, `footer`. - * - * Generated from protobuf field string type = 2; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Type of the text in the block. Available options are: `paragraph`, - * `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, - * `heading-5`, `header`, `footer`. - * - * Generated from protobuf field string type = 2; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * A text block could further have child blocks. - * Repeated blocks support further hierarchies and nested blocks. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock> - */ - public function getBlocks() - { - return $this->blocks; - } - - /** - * A text block could further have child blocks. - * Repeated blocks support further hierarchies and nested blocks. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; - * @param \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock[] $var - * @return $this - */ - public function setBlocks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\DocumentLayout\DocumentLayoutBlock::class); - $this->blocks = $arr; - - return $this; - } - - /** - * Annotation of the text block. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Annotations annotations = 4; - * @return \Google\Cloud\DocumentAI\V1\Document\Annotations|null - */ - public function getAnnotations() - { - return $this->annotations; - } - - public function hasAnnotations() - { - return isset($this->annotations); - } - - public function clearAnnotations() - { - unset($this->annotations); - } - - /** - * Annotation of the text block. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Annotations annotations = 4; - * @param \Google\Cloud\DocumentAI\V1\Document\Annotations $var - * @return $this - */ - public function setAnnotations($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Annotations::class); - $this->annotations = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntitiesRevision.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntitiesRevision.php deleted file mode 100644 index da63e9598c67..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntitiesRevision.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.documentai.v1.Document.EntitiesRevision - */ -class EntitiesRevision extends \Google\Protobuf\Internal\Message -{ - /** - * The revision id. - * - * Generated from protobuf field string revision_id = 1; - */ - protected $revision_id = ''; - /** - * The entities in this revision. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity entities = 2; - */ - private $entities; - /** - * The entity validation output for this revision. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.EntityValidationOutput entity_validation_output = 3; - */ - protected $entity_validation_output = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $revision_id - * The revision id. - * @type \Google\Cloud\DocumentAI\V1\Document\Entity[] $entities - * The entities in this revision. - * @type \Google\Cloud\DocumentAI\V1\Document\EntityValidationOutput $entity_validation_output - * The entity validation output for this revision. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * The revision id. - * - * Generated from protobuf field string revision_id = 1; - * @return string - */ - public function getRevisionId() - { - return $this->revision_id; - } - - /** - * The revision id. - * - * Generated from protobuf field string revision_id = 1; - * @param string $var - * @return $this - */ - public function setRevisionId($var) - { - GPBUtil::checkString($var, True); - $this->revision_id = $var; - - return $this; - } - - /** - * The entities in this revision. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity entities = 2; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Entity> - */ - public function getEntities() - { - return $this->entities; - } - - /** - * The entities in this revision. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity entities = 2; - * @param \Google\Cloud\DocumentAI\V1\Document\Entity[] $var - * @return $this - */ - public function setEntities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Entity::class); - $this->entities = $arr; - - return $this; - } - - /** - * The entity validation output for this revision. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.EntityValidationOutput entity_validation_output = 3; - * @return \Google\Cloud\DocumentAI\V1\Document\EntityValidationOutput|null - */ - public function getEntityValidationOutput() - { - return $this->entity_validation_output; - } - - public function hasEntityValidationOutput() - { - return isset($this->entity_validation_output); - } - - public function clearEntityValidationOutput() - { - unset($this->entity_validation_output); - } - - /** - * The entity validation output for this revision. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.EntityValidationOutput entity_validation_output = 3; - * @param \Google\Cloud\DocumentAI\V1\Document\EntityValidationOutput $var - * @return $this - */ - public function setEntityValidationOutput($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\EntityValidationOutput::class); - $this->entity_validation_output = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Entity.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Entity.php deleted file mode 100644 index 70e64e229c93..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Entity.php +++ /dev/null @@ -1,523 +0,0 @@ -google.cloud.documentai.v1.Document.Entity - */ -class Entity extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Provenance of the entity. - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $text_anchor = null; - /** - * Required. Entity type from a schema, for example, `Address`. - * - * Generated from protobuf field string type = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = ''; - /** - * Optional. Text value of the entity, for example, `1600 Amphitheatre - * Pkwy`. - * - * Generated from protobuf field string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $mention_text = ''; - /** - * Optional. Deprecated. Use `id` field instead. - * - * Generated from protobuf field string mention_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $mention_id = ''; - /** - * Optional. Confidence of detected Schema entity. Range `[0, 1]`. - * - * Generated from protobuf field float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $confidence = 0.0; - /** - * Optional. Represents the provenance of this entity wrt. the location on - * the page where it was found. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_anchor = null; - /** - * Optional. Canonical id. This will be a unique value in the entity list - * for this document. - * - * Generated from protobuf field string id = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $id = ''; - /** - * Optional. Normalized entity value. Absent if the extracted value could - * not be converted or the type (for example, address) is not supported for - * certain parsers. This field is also only populated for certain supported - * document types. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Entity.NormalizedValue normalized_value = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $normalized_value = null; - /** - * Optional. Entities can be nested to form a hierarchical data structure - * representing the content in the document. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $properties; - /** - * Optional. The history of this annotation. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $provenance = null; - /** - * Optional. Whether the entity will be redacted for de-identification - * purposes. - * - * Generated from protobuf field bool redacted = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $redacted = false; - /** - * Optional. Specifies how the entity's value is obtained. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Entity.Method method = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $method = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Document\TextAnchor $text_anchor - * Optional. Provenance of the entity. - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. - * @type string $type - * Required. Entity type from a schema, for example, `Address`. - * @type string $mention_text - * Optional. Text value of the entity, for example, `1600 Amphitheatre - * Pkwy`. - * @type string $mention_id - * Optional. Deprecated. Use `id` field instead. - * @type float $confidence - * Optional. Confidence of detected Schema entity. Range `[0, 1]`. - * @type \Google\Cloud\DocumentAI\V1\Document\PageAnchor $page_anchor - * Optional. Represents the provenance of this entity wrt. the location on - * the page where it was found. - * @type string $id - * Optional. Canonical id. This will be a unique value in the entity list - * for this document. - * @type \Google\Cloud\DocumentAI\V1\Document\Entity\NormalizedValue $normalized_value - * Optional. Normalized entity value. Absent if the extracted value could - * not be converted or the type (for example, address) is not supported for - * certain parsers. This field is also only populated for certain supported - * document types. - * @type \Google\Cloud\DocumentAI\V1\Document\Entity[] $properties - * Optional. Entities can be nested to form a hierarchical data structure - * representing the content in the document. - * @type \Google\Cloud\DocumentAI\V1\Document\Provenance $provenance - * Optional. The history of this annotation. - * @type bool $redacted - * Optional. Whether the entity will be redacted for de-identification - * purposes. - * @type int $method - * Optional. Specifies how the entity's value is obtained. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Provenance of the entity. - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\DocumentAI\V1\Document\TextAnchor|null - */ - public function getTextAnchor() - { - return $this->text_anchor; - } - - public function hasTextAnchor() - { - return isset($this->text_anchor); - } - - public function clearTextAnchor() - { - unset($this->text_anchor); - } - - /** - * Optional. Provenance of the entity. - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\DocumentAI\V1\Document\TextAnchor $var - * @return $this - */ - public function setTextAnchor($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\TextAnchor::class); - $this->text_anchor = $var; - - return $this; - } - - /** - * Required. Entity type from a schema, for example, `Address`. - * - * Generated from protobuf field string type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Required. Entity type from a schema, for example, `Address`. - * - * Generated from protobuf field string type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * Optional. Text value of the entity, for example, `1600 Amphitheatre - * Pkwy`. - * - * Generated from protobuf field string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMentionText() - { - return $this->mention_text; - } - - /** - * Optional. Text value of the entity, for example, `1600 Amphitheatre - * Pkwy`. - * - * Generated from protobuf field string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMentionText($var) - { - GPBUtil::checkString($var, True); - $this->mention_text = $var; - - return $this; - } - - /** - * Optional. Deprecated. Use `id` field instead. - * - * Generated from protobuf field string mention_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMentionId() - { - return $this->mention_id; - } - - /** - * Optional. Deprecated. Use `id` field instead. - * - * Generated from protobuf field string mention_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMentionId($var) - { - GPBUtil::checkString($var, True); - $this->mention_id = $var; - - return $this; - } - - /** - * Optional. Confidence of detected Schema entity. Range `[0, 1]`. - * - * Generated from protobuf field float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * Optional. Confidence of detected Schema entity. Range `[0, 1]`. - * - * Generated from protobuf field float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - - /** - * Optional. Represents the provenance of this entity wrt. the location on - * the page where it was found. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\DocumentAI\V1\Document\PageAnchor|null - */ - public function getPageAnchor() - { - return $this->page_anchor; - } - - public function hasPageAnchor() - { - return isset($this->page_anchor); - } - - public function clearPageAnchor() - { - unset($this->page_anchor); - } - - /** - * Optional. Represents the provenance of this entity wrt. the location on - * the page where it was found. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\DocumentAI\V1\Document\PageAnchor $var - * @return $this - */ - public function setPageAnchor($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\PageAnchor::class); - $this->page_anchor = $var; - - return $this; - } - - /** - * Optional. Canonical id. This will be a unique value in the entity list - * for this document. - * - * Generated from protobuf field string id = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Optional. Canonical id. This will be a unique value in the entity list - * for this document. - * - * Generated from protobuf field string id = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Optional. Normalized entity value. Absent if the extracted value could - * not be converted or the type (for example, address) is not supported for - * certain parsers. This field is also only populated for certain supported - * document types. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Entity.NormalizedValue normalized_value = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\DocumentAI\V1\Document\Entity\NormalizedValue|null - */ - public function getNormalizedValue() - { - return $this->normalized_value; - } - - public function hasNormalizedValue() - { - return isset($this->normalized_value); - } - - public function clearNormalizedValue() - { - unset($this->normalized_value); - } - - /** - * Optional. Normalized entity value. Absent if the extracted value could - * not be converted or the type (for example, address) is not supported for - * certain parsers. This field is also only populated for certain supported - * document types. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Entity.NormalizedValue normalized_value = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\DocumentAI\V1\Document\Entity\NormalizedValue $var - * @return $this - */ - public function setNormalizedValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Entity\NormalizedValue::class); - $this->normalized_value = $var; - - return $this; - } - - /** - * Optional. Entities can be nested to form a hierarchical data structure - * representing the content in the document. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Entity> - */ - public function getProperties() - { - return $this->properties; - } - - /** - * Optional. Entities can be nested to form a hierarchical data structure - * representing the content in the document. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\DocumentAI\V1\Document\Entity[] $var - * @return $this - */ - public function setProperties($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Entity::class); - $this->properties = $arr; - - return $this; - } - - /** - * Optional. The history of this annotation. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\DocumentAI\V1\Document\Provenance|null - */ - public function getProvenance() - { - return $this->provenance; - } - - public function hasProvenance() - { - return isset($this->provenance); - } - - public function clearProvenance() - { - unset($this->provenance); - } - - /** - * Optional. The history of this annotation. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\DocumentAI\V1\Document\Provenance $var - * @return $this - */ - public function setProvenance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Provenance::class); - $this->provenance = $var; - - return $this; - } - - /** - * Optional. Whether the entity will be redacted for de-identification - * purposes. - * - * Generated from protobuf field bool redacted = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getRedacted() - { - return $this->redacted; - } - - /** - * Optional. Whether the entity will be redacted for de-identification - * purposes. - * - * Generated from protobuf field bool redacted = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setRedacted($var) - { - GPBUtil::checkBool($var); - $this->redacted = $var; - - return $this; - } - - /** - * Optional. Specifies how the entity's value is obtained. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Entity.Method method = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMethod() - { - return $this->method; - } - - /** - * Optional. Specifies how the entity's value is obtained. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Entity.Method method = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMethod($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\Document\Entity\Method::class); - $this->method = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Entity/Method.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Entity/Method.php deleted file mode 100644 index 2e4723041898..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Entity/Method.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.documentai.v1.Document.Entity.Method - */ -class Method -{ - /** - * When the method is not specified, it should be treated as `EXTRACT`. - * - * Generated from protobuf enum METHOD_UNSPECIFIED = 0; - */ - const METHOD_UNSPECIFIED = 0; - /** - * The entity's value is directly extracted as-is from the document - * text. - * - * Generated from protobuf enum EXTRACT = 1; - */ - const EXTRACT = 1; - /** - * The entity's value is derived through inference and is not - * necessarily an exact text extraction from the document. - * - * Generated from protobuf enum DERIVE = 2; - */ - const DERIVE = 2; - - private static $valueToName = [ - self::METHOD_UNSPECIFIED => 'METHOD_UNSPECIFIED', - self::EXTRACT => 'EXTRACT', - self::DERIVE => 'DERIVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Entity/NormalizedValue.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Entity/NormalizedValue.php deleted file mode 100644 index cd09e678f3d2..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Entity/NormalizedValue.php +++ /dev/null @@ -1,390 +0,0 @@ -google.cloud.documentai.v1.Document.Entity.NormalizedValue - */ -class NormalizedValue extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. An optional field to store a normalized string. - * For some entity types, one of respective `structured_value` fields may - * also be populated. Also not all the types of `structured_value` will be - * normalized. For example, some processors may not generate `float` - * or `integer` normalized text by default. - * Below are sample formats mapped to structured values. - * - Money/Currency type (`money_value`) is in the ISO 4217 text format. - * - Date type (`date_value`) is in the ISO 8601 text format. - * - Datetime type (`datetime_value`) is in the ISO 8601 text format. - * - * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $text = ''; - protected $structured_value; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Type\Money $money_value - * Money value. See also: - * https://github.com/googleapis/googleapis/blob/master/google/type/money.proto - * @type \Google\Type\Date $date_value - * Date value. Includes year, month, day. See also: - * https://github.com/googleapis/googleapis/blob/master/google/type/date.proto - * @type \Google\Type\DateTime $datetime_value - * DateTime value. Includes date, time, and timezone. See also: - * https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto - * @type \Google\Type\PostalAddress $address_value - * Postal address. See also: - * https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto - * @type bool $boolean_value - * Boolean value. Can be used for entities with binary values, or for - * checkboxes. - * @type int $integer_value - * Integer value. - * @type float $float_value - * Float value. - * @type bool $signature_value - * A signature - a graphical representation of a person's name, - * often used to sign a document. - * @type string $text - * Optional. An optional field to store a normalized string. - * For some entity types, one of respective `structured_value` fields may - * also be populated. Also not all the types of `structured_value` will be - * normalized. For example, some processors may not generate `float` - * or `integer` normalized text by default. - * Below are sample formats mapped to structured values. - * - Money/Currency type (`money_value`) is in the ISO 4217 text format. - * - Date type (`date_value`) is in the ISO 8601 text format. - * - Datetime type (`datetime_value`) is in the ISO 8601 text format. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Money value. See also: - * https://github.com/googleapis/googleapis/blob/master/google/type/money.proto - * - * Generated from protobuf field .google.type.Money money_value = 2; - * @return \Google\Type\Money|null - */ - public function getMoneyValue() - { - return $this->readOneof(2); - } - - public function hasMoneyValue() - { - return $this->hasOneof(2); - } - - /** - * Money value. See also: - * https://github.com/googleapis/googleapis/blob/master/google/type/money.proto - * - * Generated from protobuf field .google.type.Money money_value = 2; - * @param \Google\Type\Money $var - * @return $this - */ - public function setMoneyValue($var) - { - GPBUtil::checkMessage($var, \Google\Type\Money::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Date value. Includes year, month, day. See also: - * https://github.com/googleapis/googleapis/blob/master/google/type/date.proto - * - * Generated from protobuf field .google.type.Date date_value = 3; - * @return \Google\Type\Date|null - */ - public function getDateValue() - { - return $this->readOneof(3); - } - - public function hasDateValue() - { - return $this->hasOneof(3); - } - - /** - * Date value. Includes year, month, day. See also: - * https://github.com/googleapis/googleapis/blob/master/google/type/date.proto - * - * Generated from protobuf field .google.type.Date date_value = 3; - * @param \Google\Type\Date $var - * @return $this - */ - public function setDateValue($var) - { - GPBUtil::checkMessage($var, \Google\Type\Date::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * DateTime value. Includes date, time, and timezone. See also: - * https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto - * - * Generated from protobuf field .google.type.DateTime datetime_value = 4; - * @return \Google\Type\DateTime|null - */ - public function getDatetimeValue() - { - return $this->readOneof(4); - } - - public function hasDatetimeValue() - { - return $this->hasOneof(4); - } - - /** - * DateTime value. Includes date, time, and timezone. See also: - * https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto - * - * Generated from protobuf field .google.type.DateTime datetime_value = 4; - * @param \Google\Type\DateTime $var - * @return $this - */ - public function setDatetimeValue($var) - { - GPBUtil::checkMessage($var, \Google\Type\DateTime::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Postal address. See also: - * https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto - * - * Generated from protobuf field .google.type.PostalAddress address_value = 5; - * @return \Google\Type\PostalAddress|null - */ - public function getAddressValue() - { - return $this->readOneof(5); - } - - public function hasAddressValue() - { - return $this->hasOneof(5); - } - - /** - * Postal address. See also: - * https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto - * - * Generated from protobuf field .google.type.PostalAddress address_value = 5; - * @param \Google\Type\PostalAddress $var - * @return $this - */ - public function setAddressValue($var) - { - GPBUtil::checkMessage($var, \Google\Type\PostalAddress::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Boolean value. Can be used for entities with binary values, or for - * checkboxes. - * - * Generated from protobuf field bool boolean_value = 6; - * @return bool - */ - public function getBooleanValue() - { - return $this->readOneof(6); - } - - public function hasBooleanValue() - { - return $this->hasOneof(6); - } - - /** - * Boolean value. Can be used for entities with binary values, or for - * checkboxes. - * - * Generated from protobuf field bool boolean_value = 6; - * @param bool $var - * @return $this - */ - public function setBooleanValue($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Integer value. - * - * Generated from protobuf field int32 integer_value = 7; - * @return int - */ - public function getIntegerValue() - { - return $this->readOneof(7); - } - - public function hasIntegerValue() - { - return $this->hasOneof(7); - } - - /** - * Integer value. - * - * Generated from protobuf field int32 integer_value = 7; - * @param int $var - * @return $this - */ - public function setIntegerValue($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Float value. - * - * Generated from protobuf field float float_value = 8; - * @return float - */ - public function getFloatValue() - { - return $this->readOneof(8); - } - - public function hasFloatValue() - { - return $this->hasOneof(8); - } - - /** - * Float value. - * - * Generated from protobuf field float float_value = 8; - * @param float $var - * @return $this - */ - public function setFloatValue($var) - { - GPBUtil::checkFloat($var); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * A signature - a graphical representation of a person's name, - * often used to sign a document. - * - * Generated from protobuf field bool signature_value = 10; - * @return bool - */ - public function getSignatureValue() - { - return $this->readOneof(10); - } - - public function hasSignatureValue() - { - return $this->hasOneof(10); - } - - /** - * A signature - a graphical representation of a person's name, - * often used to sign a document. - * - * Generated from protobuf field bool signature_value = 10; - * @param bool $var - * @return $this - */ - public function setSignatureValue($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Optional. An optional field to store a normalized string. - * For some entity types, one of respective `structured_value` fields may - * also be populated. Also not all the types of `structured_value` will be - * normalized. For example, some processors may not generate `float` - * or `integer` normalized text by default. - * Below are sample formats mapped to structured values. - * - Money/Currency type (`money_value`) is in the ISO 4217 text format. - * - Date type (`date_value`) is in the ISO 8601 text format. - * - Datetime type (`datetime_value`) is in the ISO 8601 text format. - * - * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * Optional. An optional field to store a normalized string. - * For some entity types, one of respective `structured_value` fields may - * also be populated. Also not all the types of `structured_value` will be - * normalized. For example, some processors may not generate `float` - * or `integer` normalized text by default. - * Below are sample formats mapped to structured values. - * - Money/Currency type (`money_value`) is in the ISO 4217 text format. - * - Date type (`date_value`) is in the ISO 8601 text format. - * - Datetime type (`datetime_value`) is in the ISO 8601 text format. - * - * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->text = $var; - - return $this; - } - - /** - * @return string - */ - public function getStructuredValue() - { - return $this->whichOneof("structured_value"); - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityRelation.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityRelation.php deleted file mode 100644 index 93344d0ccd38..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityRelation.php +++ /dev/null @@ -1,136 +0,0 @@ -google.cloud.documentai.v1.Document.EntityRelation - */ -class EntityRelation extends \Google\Protobuf\Internal\Message -{ - /** - * Subject entity id. - * - * Generated from protobuf field string subject_id = 1; - */ - protected $subject_id = ''; - /** - * Object entity id. - * - * Generated from protobuf field string object_id = 2; - */ - protected $object_id = ''; - /** - * Relationship description. - * - * Generated from protobuf field string relation = 3; - */ - protected $relation = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $subject_id - * Subject entity id. - * @type string $object_id - * Object entity id. - * @type string $relation - * Relationship description. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Subject entity id. - * - * Generated from protobuf field string subject_id = 1; - * @return string - */ - public function getSubjectId() - { - return $this->subject_id; - } - - /** - * Subject entity id. - * - * Generated from protobuf field string subject_id = 1; - * @param string $var - * @return $this - */ - public function setSubjectId($var) - { - GPBUtil::checkString($var, True); - $this->subject_id = $var; - - return $this; - } - - /** - * Object entity id. - * - * Generated from protobuf field string object_id = 2; - * @return string - */ - public function getObjectId() - { - return $this->object_id; - } - - /** - * Object entity id. - * - * Generated from protobuf field string object_id = 2; - * @param string $var - * @return $this - */ - public function setObjectId($var) - { - GPBUtil::checkString($var, True); - $this->object_id = $var; - - return $this; - } - - /** - * Relationship description. - * - * Generated from protobuf field string relation = 3; - * @return string - */ - public function getRelation() - { - return $this->relation; - } - - /** - * Relationship description. - * - * Generated from protobuf field string relation = 3; - * @param string $var - * @return $this - */ - public function setRelation($var) - { - GPBUtil::checkString($var, True); - $this->relation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityValidationOutput.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityValidationOutput.php deleted file mode 100644 index 3e33ca02c2d8..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityValidationOutput.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.documentai.v1.Document.EntityValidationOutput - */ -class EntityValidationOutput extends \Google\Protobuf\Internal\Message -{ - /** - * The result of each validation rule. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult validation_results = 1; - */ - private $validation_results; - /** - * The overall result of the validation, true if all applicable rules are - * valid. - * - * Generated from protobuf field bool pass_all_rules = 2; - */ - protected $pass_all_rules = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Document\EntityValidationOutput\ValidationResult[] $validation_results - * The result of each validation rule. - * @type bool $pass_all_rules - * The overall result of the validation, true if all applicable rules are - * valid. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * The result of each validation rule. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult validation_results = 1; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\EntityValidationOutput\ValidationResult> - */ - public function getValidationResults() - { - return $this->validation_results; - } - - /** - * The result of each validation rule. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult validation_results = 1; - * @param \Google\Cloud\DocumentAI\V1\Document\EntityValidationOutput\ValidationResult[] $var - * @return $this - */ - public function setValidationResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\EntityValidationOutput\ValidationResult::class); - $this->validation_results = $arr; - - return $this; - } - - /** - * The overall result of the validation, true if all applicable rules are - * valid. - * - * Generated from protobuf field bool pass_all_rules = 2; - * @return bool - */ - public function getPassAllRules() - { - return $this->pass_all_rules; - } - - /** - * The overall result of the validation, true if all applicable rules are - * valid. - * - * Generated from protobuf field bool pass_all_rules = 2; - * @param bool $var - * @return $this - */ - public function setPassAllRules($var) - { - GPBUtil::checkBool($var); - $this->pass_all_rules = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityValidationOutput/ValidationResult.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityValidationOutput/ValidationResult.php deleted file mode 100644 index fad866d5bdd4..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityValidationOutput/ValidationResult.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult - */ -class ValidationResult extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the validation rule. - * - * Generated from protobuf field string rule_name = 1; - */ - protected $rule_name = ''; - /** - * The description of the validation rule. - * - * Generated from protobuf field string rule_description = 2; - */ - protected $rule_description = ''; - /** - * The result of the validation rule. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult.ValidationResultType validation_result_type = 3; - */ - protected $validation_result_type = 0; - /** - * The detailed information of the running the validation process using - * the entity from the document based on the validation rule. - * - * Generated from protobuf field string validation_details = 4; - */ - protected $validation_details = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $rule_name - * The name of the validation rule. - * @type string $rule_description - * The description of the validation rule. - * @type int $validation_result_type - * The result of the validation rule. - * @type string $validation_details - * The detailed information of the running the validation process using - * the entity from the document based on the validation rule. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * The name of the validation rule. - * - * Generated from protobuf field string rule_name = 1; - * @return string - */ - public function getRuleName() - { - return $this->rule_name; - } - - /** - * The name of the validation rule. - * - * Generated from protobuf field string rule_name = 1; - * @param string $var - * @return $this - */ - public function setRuleName($var) - { - GPBUtil::checkString($var, True); - $this->rule_name = $var; - - return $this; - } - - /** - * The description of the validation rule. - * - * Generated from protobuf field string rule_description = 2; - * @return string - */ - public function getRuleDescription() - { - return $this->rule_description; - } - - /** - * The description of the validation rule. - * - * Generated from protobuf field string rule_description = 2; - * @param string $var - * @return $this - */ - public function setRuleDescription($var) - { - GPBUtil::checkString($var, True); - $this->rule_description = $var; - - return $this; - } - - /** - * The result of the validation rule. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult.ValidationResultType validation_result_type = 3; - * @return int - */ - public function getValidationResultType() - { - return $this->validation_result_type; - } - - /** - * The result of the validation rule. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult.ValidationResultType validation_result_type = 3; - * @param int $var - * @return $this - */ - public function setValidationResultType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\Document\EntityValidationOutput\ValidationResult\ValidationResultType::class); - $this->validation_result_type = $var; - - return $this; - } - - /** - * The detailed information of the running the validation process using - * the entity from the document based on the validation rule. - * - * Generated from protobuf field string validation_details = 4; - * @return string - */ - public function getValidationDetails() - { - return $this->validation_details; - } - - /** - * The detailed information of the running the validation process using - * the entity from the document based on the validation rule. - * - * Generated from protobuf field string validation_details = 4; - * @param string $var - * @return $this - */ - public function setValidationDetails($var) - { - GPBUtil::checkString($var, True); - $this->validation_details = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityValidationOutput/ValidationResult/ValidationResultType.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityValidationOutput/ValidationResult/ValidationResultType.php deleted file mode 100644 index 5d1c7eebdbaf..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/EntityValidationOutput/ValidationResult/ValidationResultType.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult.ValidationResultType - */ -class ValidationResultType -{ - /** - * The validation result type is unspecified. - * - * Generated from protobuf enum VALIDATION_RESULT_TYPE_UNSPECIFIED = 0; - */ - const VALIDATION_RESULT_TYPE_UNSPECIFIED = 0; - /** - * The validation is valid. - * - * Generated from protobuf enum VALIDATION_RESULT_TYPE_VALID = 1; - */ - const VALIDATION_RESULT_TYPE_VALID = 1; - /** - * The validation is invalid. - * - * Generated from protobuf enum VALIDATION_RESULT_TYPE_INVALID = 2; - */ - const VALIDATION_RESULT_TYPE_INVALID = 2; - /** - * The validation is skipped. - * - * Generated from protobuf enum VALIDATION_RESULT_TYPE_SKIPPED = 3; - */ - const VALIDATION_RESULT_TYPE_SKIPPED = 3; - /** - * The validation is not applicable. - * - * Generated from protobuf enum VALIDATION_RESULT_TYPE_NOT_APPLICABLE = 4; - */ - const VALIDATION_RESULT_TYPE_NOT_APPLICABLE = 4; - - private static $valueToName = [ - self::VALIDATION_RESULT_TYPE_UNSPECIFIED => 'VALIDATION_RESULT_TYPE_UNSPECIFIED', - self::VALIDATION_RESULT_TYPE_VALID => 'VALIDATION_RESULT_TYPE_VALID', - self::VALIDATION_RESULT_TYPE_INVALID => 'VALIDATION_RESULT_TYPE_INVALID', - self::VALIDATION_RESULT_TYPE_SKIPPED => 'VALIDATION_RESULT_TYPE_SKIPPED', - self::VALIDATION_RESULT_TYPE_NOT_APPLICABLE => 'VALIDATION_RESULT_TYPE_NOT_APPLICABLE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page.php deleted file mode 100644 index 37a47edf43a9..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page.php +++ /dev/null @@ -1,720 +0,0 @@ -google.cloud.documentai.v1.Document.Page - */ -class Page extends \Google\Protobuf\Internal\Message -{ - /** - * 1-based index for current - * [Page][google.cloud.documentai.v1.Document.Page] in a parent - * [Document][google.cloud.documentai.v1.Document]. Useful when a page is - * taken out of a [Document][google.cloud.documentai.v1.Document] for - * individual processing. - * - * Generated from protobuf field int32 page_number = 1; - */ - protected $page_number = 0; - /** - * Rendered image for this page. This image is preprocessed to remove any - * skew, rotation, and distortions such that the annotation bounding boxes - * can be upright and axis-aligned. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Image image = 13; - */ - protected $image = null; - /** - * Transformation matrices that were applied to the original document image - * to produce [Page.image][google.cloud.documentai.v1.Document.Page.image]. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Matrix transforms = 14; - */ - private $transforms; - /** - * Physical dimension of the page. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Dimension dimension = 2; - */ - protected $dimension = null; - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the page. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 3; - */ - protected $layout = null; - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 4; - */ - private $detected_languages; - /** - * A list of visually detected text blocks on the page. - * A block has a set of lines (collected into paragraphs) that have a common - * line-spacing and orientation. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Block blocks = 5; - */ - private $blocks; - /** - * A list of visually detected text paragraphs on the page. - * A collection of lines that a human would perceive as a paragraph. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Paragraph paragraphs = 6; - */ - private $paragraphs; - /** - * A list of visually detected text lines on the page. - * A collection of tokens that a human would perceive as a line. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Line lines = 7; - */ - private $lines; - /** - * A list of visually detected tokens on the page. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Token tokens = 8; - */ - private $tokens; - /** - * A list of detected non-text visual elements, for example, checkbox, - * signature etc. on the page. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.VisualElement visual_elements = 9; - */ - private $visual_elements; - /** - * A list of visually detected tables on the page. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Table tables = 10; - */ - private $tables; - /** - * A list of visually detected form fields on the page. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.FormField form_fields = 11; - */ - private $form_fields; - /** - * A list of visually detected symbols on the page. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Symbol symbols = 12; - */ - private $symbols; - /** - * A list of detected barcodes. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedBarcode detected_barcodes = 15; - */ - private $detected_barcodes; - /** - * Image quality scores. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.ImageQualityScores image_quality_scores = 17; - */ - protected $image_quality_scores = null; - /** - * The history of this page. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 16 [deprecated = true]; - * @deprecated - */ - protected $provenance = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $page_number - * 1-based index for current - * [Page][google.cloud.documentai.v1.Document.Page] in a parent - * [Document][google.cloud.documentai.v1.Document]. Useful when a page is - * taken out of a [Document][google.cloud.documentai.v1.Document] for - * individual processing. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\Image $image - * Rendered image for this page. This image is preprocessed to remove any - * skew, rotation, and distortions such that the annotation bounding boxes - * can be upright and axis-aligned. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\Matrix[] $transforms - * Transformation matrices that were applied to the original document image - * to produce [Page.image][google.cloud.documentai.v1.Document.Page.image]. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\Dimension $dimension - * Physical dimension of the page. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the page. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $detected_languages - * A list of detected languages together with confidence. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\Block[] $blocks - * A list of visually detected text blocks on the page. - * A block has a set of lines (collected into paragraphs) that have a common - * line-spacing and orientation. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\Paragraph[] $paragraphs - * A list of visually detected text paragraphs on the page. - * A collection of lines that a human would perceive as a paragraph. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\Line[] $lines - * A list of visually detected text lines on the page. - * A collection of tokens that a human would perceive as a line. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\Token[] $tokens - * A list of visually detected tokens on the page. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\VisualElement[] $visual_elements - * A list of detected non-text visual elements, for example, checkbox, - * signature etc. on the page. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\Table[] $tables - * A list of visually detected tables on the page. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\FormField[] $form_fields - * A list of visually detected form fields on the page. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\Symbol[] $symbols - * A list of visually detected symbols on the page. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\DetectedBarcode[] $detected_barcodes - * A list of detected barcodes. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\ImageQualityScores $image_quality_scores - * Image quality scores. - * @type \Google\Cloud\DocumentAI\V1\Document\Provenance $provenance - * The history of this page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * 1-based index for current - * [Page][google.cloud.documentai.v1.Document.Page] in a parent - * [Document][google.cloud.documentai.v1.Document]. Useful when a page is - * taken out of a [Document][google.cloud.documentai.v1.Document] for - * individual processing. - * - * Generated from protobuf field int32 page_number = 1; - * @return int - */ - public function getPageNumber() - { - return $this->page_number; - } - - /** - * 1-based index for current - * [Page][google.cloud.documentai.v1.Document.Page] in a parent - * [Document][google.cloud.documentai.v1.Document]. Useful when a page is - * taken out of a [Document][google.cloud.documentai.v1.Document] for - * individual processing. - * - * Generated from protobuf field int32 page_number = 1; - * @param int $var - * @return $this - */ - public function setPageNumber($var) - { - GPBUtil::checkInt32($var); - $this->page_number = $var; - - return $this; - } - - /** - * Rendered image for this page. This image is preprocessed to remove any - * skew, rotation, and distortions such that the annotation bounding boxes - * can be upright and axis-aligned. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Image image = 13; - * @return \Google\Cloud\DocumentAI\V1\Document\Page\Image|null - */ - public function getImage() - { - return $this->image; - } - - public function hasImage() - { - return isset($this->image); - } - - public function clearImage() - { - unset($this->image); - } - - /** - * Rendered image for this page. This image is preprocessed to remove any - * skew, rotation, and distortions such that the annotation bounding boxes - * can be upright and axis-aligned. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Image image = 13; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\Image $var - * @return $this - */ - public function setImage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Image::class); - $this->image = $var; - - return $this; - } - - /** - * Transformation matrices that were applied to the original document image - * to produce [Page.image][google.cloud.documentai.v1.Document.Page.image]. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Matrix transforms = 14; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\Matrix> - */ - public function getTransforms() - { - return $this->transforms; - } - - /** - * Transformation matrices that were applied to the original document image - * to produce [Page.image][google.cloud.documentai.v1.Document.Page.image]. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Matrix transforms = 14; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\Matrix[] $var - * @return $this - */ - public function setTransforms($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\Matrix::class); - $this->transforms = $arr; - - return $this; - } - - /** - * Physical dimension of the page. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Dimension dimension = 2; - * @return \Google\Cloud\DocumentAI\V1\Document\Page\Dimension|null - */ - public function getDimension() - { - return $this->dimension; - } - - public function hasDimension() - { - return isset($this->dimension); - } - - public function clearDimension() - { - unset($this->dimension); - } - - /** - * Physical dimension of the page. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Dimension dimension = 2; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\Dimension $var - * @return $this - */ - public function setDimension($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Dimension::class); - $this->dimension = $var; - - return $this; - } - - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the page. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 3; - * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null - */ - public function getLayout() - { - return $this->layout; - } - - public function hasLayout() - { - return isset($this->layout); - } - - public function clearLayout() - { - unset($this->layout); - } - - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the page. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 3; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var - * @return $this - */ - public function setLayout($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Layout::class); - $this->layout = $var; - - return $this; - } - - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 4; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage> - */ - public function getDetectedLanguages() - { - return $this->detected_languages; - } - - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 4; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $var - * @return $this - */ - public function setDetectedLanguages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage::class); - $this->detected_languages = $arr; - - return $this; - } - - /** - * A list of visually detected text blocks on the page. - * A block has a set of lines (collected into paragraphs) that have a common - * line-spacing and orientation. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Block blocks = 5; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\Block> - */ - public function getBlocks() - { - return $this->blocks; - } - - /** - * A list of visually detected text blocks on the page. - * A block has a set of lines (collected into paragraphs) that have a common - * line-spacing and orientation. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Block blocks = 5; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\Block[] $var - * @return $this - */ - public function setBlocks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\Block::class); - $this->blocks = $arr; - - return $this; - } - - /** - * A list of visually detected text paragraphs on the page. - * A collection of lines that a human would perceive as a paragraph. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Paragraph paragraphs = 6; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\Paragraph> - */ - public function getParagraphs() - { - return $this->paragraphs; - } - - /** - * A list of visually detected text paragraphs on the page. - * A collection of lines that a human would perceive as a paragraph. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Paragraph paragraphs = 6; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\Paragraph[] $var - * @return $this - */ - public function setParagraphs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\Paragraph::class); - $this->paragraphs = $arr; - - return $this; - } - - /** - * A list of visually detected text lines on the page. - * A collection of tokens that a human would perceive as a line. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Line lines = 7; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\Line> - */ - public function getLines() - { - return $this->lines; - } - - /** - * A list of visually detected text lines on the page. - * A collection of tokens that a human would perceive as a line. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Line lines = 7; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\Line[] $var - * @return $this - */ - public function setLines($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\Line::class); - $this->lines = $arr; - - return $this; - } - - /** - * A list of visually detected tokens on the page. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Token tokens = 8; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\Token> - */ - public function getTokens() - { - return $this->tokens; - } - - /** - * A list of visually detected tokens on the page. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Token tokens = 8; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\Token[] $var - * @return $this - */ - public function setTokens($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\Token::class); - $this->tokens = $arr; - - return $this; - } - - /** - * A list of detected non-text visual elements, for example, checkbox, - * signature etc. on the page. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.VisualElement visual_elements = 9; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\VisualElement> - */ - public function getVisualElements() - { - return $this->visual_elements; - } - - /** - * A list of detected non-text visual elements, for example, checkbox, - * signature etc. on the page. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.VisualElement visual_elements = 9; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\VisualElement[] $var - * @return $this - */ - public function setVisualElements($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\VisualElement::class); - $this->visual_elements = $arr; - - return $this; - } - - /** - * A list of visually detected tables on the page. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Table tables = 10; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\Table> - */ - public function getTables() - { - return $this->tables; - } - - /** - * A list of visually detected tables on the page. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Table tables = 10; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\Table[] $var - * @return $this - */ - public function setTables($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\Table::class); - $this->tables = $arr; - - return $this; - } - - /** - * A list of visually detected form fields on the page. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.FormField form_fields = 11; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\FormField> - */ - public function getFormFields() - { - return $this->form_fields; - } - - /** - * A list of visually detected form fields on the page. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.FormField form_fields = 11; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\FormField[] $var - * @return $this - */ - public function setFormFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\FormField::class); - $this->form_fields = $arr; - - return $this; - } - - /** - * A list of visually detected symbols on the page. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Symbol symbols = 12; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\Symbol> - */ - public function getSymbols() - { - return $this->symbols; - } - - /** - * A list of visually detected symbols on the page. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Symbol symbols = 12; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\Symbol[] $var - * @return $this - */ - public function setSymbols($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\Symbol::class); - $this->symbols = $arr; - - return $this; - } - - /** - * A list of detected barcodes. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedBarcode detected_barcodes = 15; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedBarcode> - */ - public function getDetectedBarcodes() - { - return $this->detected_barcodes; - } - - /** - * A list of detected barcodes. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedBarcode detected_barcodes = 15; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\DetectedBarcode[] $var - * @return $this - */ - public function setDetectedBarcodes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\DetectedBarcode::class); - $this->detected_barcodes = $arr; - - return $this; - } - - /** - * Image quality scores. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.ImageQualityScores image_quality_scores = 17; - * @return \Google\Cloud\DocumentAI\V1\Document\Page\ImageQualityScores|null - */ - public function getImageQualityScores() - { - return $this->image_quality_scores; - } - - public function hasImageQualityScores() - { - return isset($this->image_quality_scores); - } - - public function clearImageQualityScores() - { - unset($this->image_quality_scores); - } - - /** - * Image quality scores. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.ImageQualityScores image_quality_scores = 17; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\ImageQualityScores $var - * @return $this - */ - public function setImageQualityScores($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\ImageQualityScores::class); - $this->image_quality_scores = $var; - - return $this; - } - - /** - * The history of this page. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 16 [deprecated = true]; - * @return \Google\Cloud\DocumentAI\V1\Document\Provenance|null - * @deprecated - */ - public function getProvenance() - { - if (isset($this->provenance)) { - @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); - } - return $this->provenance; - } - - public function hasProvenance() - { - if (isset($this->provenance)) { - @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); - } - return isset($this->provenance); - } - - public function clearProvenance() - { - @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); - unset($this->provenance); - } - - /** - * The history of this page. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 16 [deprecated = true]; - * @param \Google\Cloud\DocumentAI\V1\Document\Provenance $var - * @return $this - * @deprecated - */ - public function setProvenance($var) - { - @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Provenance::class); - $this->provenance = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Block.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Block.php deleted file mode 100644 index a405a9a4d030..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Block.php +++ /dev/null @@ -1,171 +0,0 @@ -google.cloud.documentai.v1.Document.Page.Block - */ -class Block extends \Google\Protobuf\Internal\Message -{ - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Block][google.cloud.documentai.v1.Document.Page.Block]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; - */ - protected $layout = null; - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 2; - */ - private $detected_languages; - /** - * The history of this annotation. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; - * @deprecated - */ - protected $provenance = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Block][google.cloud.documentai.v1.Document.Page.Block]. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $detected_languages - * A list of detected languages together with confidence. - * @type \Google\Cloud\DocumentAI\V1\Document\Provenance $provenance - * The history of this annotation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Block][google.cloud.documentai.v1.Document.Page.Block]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; - * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null - */ - public function getLayout() - { - return $this->layout; - } - - public function hasLayout() - { - return isset($this->layout); - } - - public function clearLayout() - { - unset($this->layout); - } - - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Block][google.cloud.documentai.v1.Document.Page.Block]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var - * @return $this - */ - public function setLayout($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Layout::class); - $this->layout = $var; - - return $this; - } - - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 2; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage> - */ - public function getDetectedLanguages() - { - return $this->detected_languages; - } - - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 2; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $var - * @return $this - */ - public function setDetectedLanguages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage::class); - $this->detected_languages = $arr; - - return $this; - } - - /** - * The history of this annotation. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; - * @return \Google\Cloud\DocumentAI\V1\Document\Provenance|null - * @deprecated - */ - public function getProvenance() - { - if (isset($this->provenance)) { - @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); - } - return $this->provenance; - } - - public function hasProvenance() - { - if (isset($this->provenance)) { - @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); - } - return isset($this->provenance); - } - - public function clearProvenance() - { - @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); - unset($this->provenance); - } - - /** - * The history of this annotation. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; - * @param \Google\Cloud\DocumentAI\V1\Document\Provenance $var - * @return $this - * @deprecated - */ - public function setProvenance($var) - { - @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Provenance::class); - $this->provenance = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/DetectedBarcode.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/DetectedBarcode.php deleted file mode 100644 index 5c1d620a7725..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/DetectedBarcode.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.documentai.v1.Document.Page.DetectedBarcode - */ -class DetectedBarcode extends \Google\Protobuf\Internal\Message -{ - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; - */ - protected $layout = null; - /** - * Detailed barcode information of the - * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Barcode barcode = 2; - */ - protected $barcode = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. - * @type \Google\Cloud\DocumentAI\V1\Barcode $barcode - * Detailed barcode information of the - * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; - * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null - */ - public function getLayout() - { - return $this->layout; - } - - public function hasLayout() - { - return isset($this->layout); - } - - public function clearLayout() - { - unset($this->layout); - } - - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var - * @return $this - */ - public function setLayout($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Layout::class); - $this->layout = $var; - - return $this; - } - - /** - * Detailed barcode information of the - * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Barcode barcode = 2; - * @return \Google\Cloud\DocumentAI\V1\Barcode|null - */ - public function getBarcode() - { - return $this->barcode; - } - - public function hasBarcode() - { - return isset($this->barcode); - } - - public function clearBarcode() - { - unset($this->barcode); - } - - /** - * Detailed barcode information of the - * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Barcode barcode = 2; - * @param \Google\Cloud\DocumentAI\V1\Barcode $var - * @return $this - */ - public function setBarcode($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Barcode::class); - $this->barcode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/DetectedLanguage.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/DetectedLanguage.php deleted file mode 100644 index ac08ad3ba446..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/DetectedLanguage.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.documentai.v1.Document.Page.DetectedLanguage - */ -class DetectedLanguage extends \Google\Protobuf\Internal\Message -{ - /** - * The [BCP-47 language - * code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), - * such as `en-US` or `sr-Latn`. - * - * Generated from protobuf field string language_code = 1; - */ - protected $language_code = ''; - /** - * Confidence of detected language. Range `[0, 1]`. - * - * Generated from protobuf field float confidence = 2; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $language_code - * The [BCP-47 language - * code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), - * such as `en-US` or `sr-Latn`. - * @type float $confidence - * Confidence of detected language. Range `[0, 1]`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * The [BCP-47 language - * code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), - * such as `en-US` or `sr-Latn`. - * - * Generated from protobuf field string language_code = 1; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The [BCP-47 language - * code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), - * such as `en-US` or `sr-Latn`. - * - * Generated from protobuf field string language_code = 1; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * Confidence of detected language. Range `[0, 1]`. - * - * Generated from protobuf field float confidence = 2; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * Confidence of detected language. Range `[0, 1]`. - * - * Generated from protobuf field float confidence = 2; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Dimension.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Dimension.php deleted file mode 100644 index cd7bddb6bdad..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Dimension.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.documentai.v1.Document.Page.Dimension - */ -class Dimension extends \Google\Protobuf\Internal\Message -{ - /** - * Page width. - * - * Generated from protobuf field float width = 1; - */ - protected $width = 0.0; - /** - * Page height. - * - * Generated from protobuf field float height = 2; - */ - protected $height = 0.0; - /** - * Dimension unit. - * - * Generated from protobuf field string unit = 3; - */ - protected $unit = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $width - * Page width. - * @type float $height - * Page height. - * @type string $unit - * Dimension unit. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Page width. - * - * Generated from protobuf field float width = 1; - * @return float - */ - public function getWidth() - { - return $this->width; - } - - /** - * Page width. - * - * Generated from protobuf field float width = 1; - * @param float $var - * @return $this - */ - public function setWidth($var) - { - GPBUtil::checkFloat($var); - $this->width = $var; - - return $this; - } - - /** - * Page height. - * - * Generated from protobuf field float height = 2; - * @return float - */ - public function getHeight() - { - return $this->height; - } - - /** - * Page height. - * - * Generated from protobuf field float height = 2; - * @param float $var - * @return $this - */ - public function setHeight($var) - { - GPBUtil::checkFloat($var); - $this->height = $var; - - return $this; - } - - /** - * Dimension unit. - * - * Generated from protobuf field string unit = 3; - * @return string - */ - public function getUnit() - { - return $this->unit; - } - - /** - * Dimension unit. - * - * Generated from protobuf field string unit = 3; - * @param string $var - * @return $this - */ - public function setUnit($var) - { - GPBUtil::checkString($var, True); - $this->unit = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/FormField.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/FormField.php deleted file mode 100644 index 4f52cc2af82b..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/FormField.php +++ /dev/null @@ -1,379 +0,0 @@ -google.cloud.documentai.v1.Document.Page.FormField - */ -class FormField extends \Google\Protobuf\Internal\Message -{ - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the - * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. - * For example, `Address`, `Email`, `Grand total`, `Phone number`, etc. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout field_name = 1; - */ - protected $field_name = null; - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the - * [FormField][google.cloud.documentai.v1.Document.Page.FormField] value. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout field_value = 2; - */ - protected $field_value = null; - /** - * A list of detected languages for name together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage name_detected_languages = 3; - */ - private $name_detected_languages; - /** - * A list of detected languages for value together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage value_detected_languages = 4; - */ - private $value_detected_languages; - /** - * If the value is non-textual, this field represents the type. Current - * valid values are: - * - blank (this indicates the `field_value` is normal text) - * - `unfilled_checkbox` - * - `filled_checkbox` - * - * Generated from protobuf field string value_type = 5; - */ - protected $value_type = ''; - /** - * Created for Labeling UI to export key text. - * If corrections were made to the text identified by the - * `field_name.text_anchor`, this field will contain the correction. - * - * Generated from protobuf field string corrected_key_text = 6; - */ - protected $corrected_key_text = ''; - /** - * Created for Labeling UI to export value text. - * If corrections were made to the text identified by the - * `field_value.text_anchor`, this field will contain the correction. - * - * Generated from protobuf field string corrected_value_text = 7; - */ - protected $corrected_value_text = ''; - /** - * The history of this annotation. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 8; - */ - protected $provenance = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $field_name - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the - * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. - * For example, `Address`, `Email`, `Grand total`, `Phone number`, etc. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $field_value - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the - * [FormField][google.cloud.documentai.v1.Document.Page.FormField] value. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $name_detected_languages - * A list of detected languages for name together with confidence. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $value_detected_languages - * A list of detected languages for value together with confidence. - * @type string $value_type - * If the value is non-textual, this field represents the type. Current - * valid values are: - * - blank (this indicates the `field_value` is normal text) - * - `unfilled_checkbox` - * - `filled_checkbox` - * @type string $corrected_key_text - * Created for Labeling UI to export key text. - * If corrections were made to the text identified by the - * `field_name.text_anchor`, this field will contain the correction. - * @type string $corrected_value_text - * Created for Labeling UI to export value text. - * If corrections were made to the text identified by the - * `field_value.text_anchor`, this field will contain the correction. - * @type \Google\Cloud\DocumentAI\V1\Document\Provenance $provenance - * The history of this annotation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the - * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. - * For example, `Address`, `Email`, `Grand total`, `Phone number`, etc. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout field_name = 1; - * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null - */ - public function getFieldName() - { - return $this->field_name; - } - - public function hasFieldName() - { - return isset($this->field_name); - } - - public function clearFieldName() - { - unset($this->field_name); - } - - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the - * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. - * For example, `Address`, `Email`, `Grand total`, `Phone number`, etc. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout field_name = 1; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var - * @return $this - */ - public function setFieldName($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Layout::class); - $this->field_name = $var; - - return $this; - } - - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the - * [FormField][google.cloud.documentai.v1.Document.Page.FormField] value. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout field_value = 2; - * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null - */ - public function getFieldValue() - { - return $this->field_value; - } - - public function hasFieldValue() - { - return isset($this->field_value); - } - - public function clearFieldValue() - { - unset($this->field_value); - } - - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the - * [FormField][google.cloud.documentai.v1.Document.Page.FormField] value. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout field_value = 2; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var - * @return $this - */ - public function setFieldValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Layout::class); - $this->field_value = $var; - - return $this; - } - - /** - * A list of detected languages for name together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage name_detected_languages = 3; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage> - */ - public function getNameDetectedLanguages() - { - return $this->name_detected_languages; - } - - /** - * A list of detected languages for name together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage name_detected_languages = 3; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $var - * @return $this - */ - public function setNameDetectedLanguages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage::class); - $this->name_detected_languages = $arr; - - return $this; - } - - /** - * A list of detected languages for value together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage value_detected_languages = 4; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage> - */ - public function getValueDetectedLanguages() - { - return $this->value_detected_languages; - } - - /** - * A list of detected languages for value together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage value_detected_languages = 4; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $var - * @return $this - */ - public function setValueDetectedLanguages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage::class); - $this->value_detected_languages = $arr; - - return $this; - } - - /** - * If the value is non-textual, this field represents the type. Current - * valid values are: - * - blank (this indicates the `field_value` is normal text) - * - `unfilled_checkbox` - * - `filled_checkbox` - * - * Generated from protobuf field string value_type = 5; - * @return string - */ - public function getValueType() - { - return $this->value_type; - } - - /** - * If the value is non-textual, this field represents the type. Current - * valid values are: - * - blank (this indicates the `field_value` is normal text) - * - `unfilled_checkbox` - * - `filled_checkbox` - * - * Generated from protobuf field string value_type = 5; - * @param string $var - * @return $this - */ - public function setValueType($var) - { - GPBUtil::checkString($var, True); - $this->value_type = $var; - - return $this; - } - - /** - * Created for Labeling UI to export key text. - * If corrections were made to the text identified by the - * `field_name.text_anchor`, this field will contain the correction. - * - * Generated from protobuf field string corrected_key_text = 6; - * @return string - */ - public function getCorrectedKeyText() - { - return $this->corrected_key_text; - } - - /** - * Created for Labeling UI to export key text. - * If corrections were made to the text identified by the - * `field_name.text_anchor`, this field will contain the correction. - * - * Generated from protobuf field string corrected_key_text = 6; - * @param string $var - * @return $this - */ - public function setCorrectedKeyText($var) - { - GPBUtil::checkString($var, True); - $this->corrected_key_text = $var; - - return $this; - } - - /** - * Created for Labeling UI to export value text. - * If corrections were made to the text identified by the - * `field_value.text_anchor`, this field will contain the correction. - * - * Generated from protobuf field string corrected_value_text = 7; - * @return string - */ - public function getCorrectedValueText() - { - return $this->corrected_value_text; - } - - /** - * Created for Labeling UI to export value text. - * If corrections were made to the text identified by the - * `field_value.text_anchor`, this field will contain the correction. - * - * Generated from protobuf field string corrected_value_text = 7; - * @param string $var - * @return $this - */ - public function setCorrectedValueText($var) - { - GPBUtil::checkString($var, True); - $this->corrected_value_text = $var; - - return $this; - } - - /** - * The history of this annotation. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 8; - * @return \Google\Cloud\DocumentAI\V1\Document\Provenance|null - */ - public function getProvenance() - { - return $this->provenance; - } - - public function hasProvenance() - { - return isset($this->provenance); - } - - public function clearProvenance() - { - unset($this->provenance); - } - - /** - * The history of this annotation. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 8; - * @param \Google\Cloud\DocumentAI\V1\Document\Provenance $var - * @return $this - */ - public function setProvenance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Provenance::class); - $this->provenance = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Image.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Image.php deleted file mode 100644 index a5e49f2e15d9..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Image.php +++ /dev/null @@ -1,177 +0,0 @@ -google.cloud.documentai.v1.Document.Page.Image - */ -class Image extends \Google\Protobuf\Internal\Message -{ - /** - * Raw byte content of the image. - * - * Generated from protobuf field bytes content = 1; - */ - protected $content = ''; - /** - * Encoding [media type (MIME - * type)](https://www.iana.org/assignments/media-types/media-types.xhtml) - * for the image. - * - * Generated from protobuf field string mime_type = 2; - */ - protected $mime_type = ''; - /** - * Width of the image in pixels. - * - * Generated from protobuf field int32 width = 3; - */ - protected $width = 0; - /** - * Height of the image in pixels. - * - * Generated from protobuf field int32 height = 4; - */ - protected $height = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $content - * Raw byte content of the image. - * @type string $mime_type - * Encoding [media type (MIME - * type)](https://www.iana.org/assignments/media-types/media-types.xhtml) - * for the image. - * @type int $width - * Width of the image in pixels. - * @type int $height - * Height of the image in pixels. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Raw byte content of the image. - * - * Generated from protobuf field bytes content = 1; - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * Raw byte content of the image. - * - * Generated from protobuf field bytes content = 1; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, False); - $this->content = $var; - - return $this; - } - - /** - * Encoding [media type (MIME - * type)](https://www.iana.org/assignments/media-types/media-types.xhtml) - * for the image. - * - * Generated from protobuf field string mime_type = 2; - * @return string - */ - public function getMimeType() - { - return $this->mime_type; - } - - /** - * Encoding [media type (MIME - * type)](https://www.iana.org/assignments/media-types/media-types.xhtml) - * for the image. - * - * Generated from protobuf field string mime_type = 2; - * @param string $var - * @return $this - */ - public function setMimeType($var) - { - GPBUtil::checkString($var, True); - $this->mime_type = $var; - - return $this; - } - - /** - * Width of the image in pixels. - * - * Generated from protobuf field int32 width = 3; - * @return int - */ - public function getWidth() - { - return $this->width; - } - - /** - * Width of the image in pixels. - * - * Generated from protobuf field int32 width = 3; - * @param int $var - * @return $this - */ - public function setWidth($var) - { - GPBUtil::checkInt32($var); - $this->width = $var; - - return $this; - } - - /** - * Height of the image in pixels. - * - * Generated from protobuf field int32 height = 4; - * @return int - */ - public function getHeight() - { - return $this->height; - } - - /** - * Height of the image in pixels. - * - * Generated from protobuf field int32 height = 4; - * @param int $var - * @return $this - */ - public function setHeight($var) - { - GPBUtil::checkInt32($var); - $this->height = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/ImageQualityScores.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/ImageQualityScores.php deleted file mode 100644 index 4023dbbb303c..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/ImageQualityScores.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.documentai.v1.Document.Page.ImageQualityScores - */ -class ImageQualityScores extends \Google\Protobuf\Internal\Message -{ - /** - * The overall quality score. Range `[0, 1]` where `1` is perfect quality. - * - * Generated from protobuf field float quality_score = 1; - */ - protected $quality_score = 0.0; - /** - * A list of detected defects. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; - */ - private $detected_defects; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $quality_score - * The overall quality score. Range `[0, 1]` where `1` is perfect quality. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\ImageQualityScores\DetectedDefect[] $detected_defects - * A list of detected defects. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * The overall quality score. Range `[0, 1]` where `1` is perfect quality. - * - * Generated from protobuf field float quality_score = 1; - * @return float - */ - public function getQualityScore() - { - return $this->quality_score; - } - - /** - * The overall quality score. Range `[0, 1]` where `1` is perfect quality. - * - * Generated from protobuf field float quality_score = 1; - * @param float $var - * @return $this - */ - public function setQualityScore($var) - { - GPBUtil::checkFloat($var); - $this->quality_score = $var; - - return $this; - } - - /** - * A list of detected defects. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\ImageQualityScores\DetectedDefect> - */ - public function getDetectedDefects() - { - return $this->detected_defects; - } - - /** - * A list of detected defects. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\ImageQualityScores\DetectedDefect[] $var - * @return $this - */ - public function setDetectedDefects($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\ImageQualityScores\DetectedDefect::class); - $this->detected_defects = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/ImageQualityScores/DetectedDefect.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/ImageQualityScores/DetectedDefect.php deleted file mode 100644 index 140bbcfb220e..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/ImageQualityScores/DetectedDefect.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.documentai.v1.Document.Page.ImageQualityScores.DetectedDefect - */ -class DetectedDefect extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the defect type. Supported values are: - * - `quality/defect_blurry` - * - `quality/defect_noisy` - * - `quality/defect_dark` - * - `quality/defect_faint` - * - `quality/defect_text_too_small` - * - `quality/defect_document_cutoff` - * - `quality/defect_text_cutoff` - * - `quality/defect_glare` - * - * Generated from protobuf field string type = 1; - */ - protected $type = ''; - /** - * Confidence of detected defect. Range `[0, 1]` where `1` indicates - * strong confidence that the defect exists. - * - * Generated from protobuf field float confidence = 2; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type - * Name of the defect type. Supported values are: - * - `quality/defect_blurry` - * - `quality/defect_noisy` - * - `quality/defect_dark` - * - `quality/defect_faint` - * - `quality/defect_text_too_small` - * - `quality/defect_document_cutoff` - * - `quality/defect_text_cutoff` - * - `quality/defect_glare` - * @type float $confidence - * Confidence of detected defect. Range `[0, 1]` where `1` indicates - * strong confidence that the defect exists. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Name of the defect type. Supported values are: - * - `quality/defect_blurry` - * - `quality/defect_noisy` - * - `quality/defect_dark` - * - `quality/defect_faint` - * - `quality/defect_text_too_small` - * - `quality/defect_document_cutoff` - * - `quality/defect_text_cutoff` - * - `quality/defect_glare` - * - * Generated from protobuf field string type = 1; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Name of the defect type. Supported values are: - * - `quality/defect_blurry` - * - `quality/defect_noisy` - * - `quality/defect_dark` - * - `quality/defect_faint` - * - `quality/defect_text_too_small` - * - `quality/defect_document_cutoff` - * - `quality/defect_text_cutoff` - * - `quality/defect_glare` - * - * Generated from protobuf field string type = 1; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * Confidence of detected defect. Range `[0, 1]` where `1` indicates - * strong confidence that the defect exists. - * - * Generated from protobuf field float confidence = 2; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * Confidence of detected defect. Range `[0, 1]` where `1` indicates - * strong confidence that the defect exists. - * - * Generated from protobuf field float confidence = 2; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Layout.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Layout.php deleted file mode 100644 index ad78411be810..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Layout.php +++ /dev/null @@ -1,217 +0,0 @@ -google.cloud.documentai.v1.Document.Page.Layout - */ -class Layout extends \Google\Protobuf\Internal\Message -{ - /** - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; - */ - protected $text_anchor = null; - /** - * Confidence of the current - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] within - * context of the object this layout is for. For example, confidence can - * be for a single token, a table, a visual element, etc. depending on - * context. Range `[0, 1]`. - * - * Generated from protobuf field float confidence = 2; - */ - protected $confidence = 0.0; - /** - * The bounding polygon for the - * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. - * - * Generated from protobuf field .google.cloud.documentai.v1.BoundingPoly bounding_poly = 3; - */ - protected $bounding_poly = null; - /** - * Detected orientation for the - * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout.Orientation orientation = 4; - */ - protected $orientation = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Document\TextAnchor $text_anchor - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. - * @type float $confidence - * Confidence of the current - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] within - * context of the object this layout is for. For example, confidence can - * be for a single token, a table, a visual element, etc. depending on - * context. Range `[0, 1]`. - * @type \Google\Cloud\DocumentAI\V1\BoundingPoly $bounding_poly - * The bounding polygon for the - * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. - * @type int $orientation - * Detected orientation for the - * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; - * @return \Google\Cloud\DocumentAI\V1\Document\TextAnchor|null - */ - public function getTextAnchor() - { - return $this->text_anchor; - } - - public function hasTextAnchor() - { - return isset($this->text_anchor); - } - - public function clearTextAnchor() - { - unset($this->text_anchor); - } - - /** - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; - * @param \Google\Cloud\DocumentAI\V1\Document\TextAnchor $var - * @return $this - */ - public function setTextAnchor($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\TextAnchor::class); - $this->text_anchor = $var; - - return $this; - } - - /** - * Confidence of the current - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] within - * context of the object this layout is for. For example, confidence can - * be for a single token, a table, a visual element, etc. depending on - * context. Range `[0, 1]`. - * - * Generated from protobuf field float confidence = 2; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * Confidence of the current - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] within - * context of the object this layout is for. For example, confidence can - * be for a single token, a table, a visual element, etc. depending on - * context. Range `[0, 1]`. - * - * Generated from protobuf field float confidence = 2; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - - /** - * The bounding polygon for the - * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. - * - * Generated from protobuf field .google.cloud.documentai.v1.BoundingPoly bounding_poly = 3; - * @return \Google\Cloud\DocumentAI\V1\BoundingPoly|null - */ - public function getBoundingPoly() - { - return $this->bounding_poly; - } - - public function hasBoundingPoly() - { - return isset($this->bounding_poly); - } - - public function clearBoundingPoly() - { - unset($this->bounding_poly); - } - - /** - * The bounding polygon for the - * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. - * - * Generated from protobuf field .google.cloud.documentai.v1.BoundingPoly bounding_poly = 3; - * @param \Google\Cloud\DocumentAI\V1\BoundingPoly $var - * @return $this - */ - public function setBoundingPoly($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\BoundingPoly::class); - $this->bounding_poly = $var; - - return $this; - } - - /** - * Detected orientation for the - * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout.Orientation orientation = 4; - * @return int - */ - public function getOrientation() - { - return $this->orientation; - } - - /** - * Detected orientation for the - * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout.Orientation orientation = 4; - * @param int $var - * @return $this - */ - public function setOrientation($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\Document\Page\Layout\Orientation::class); - $this->orientation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Layout/Orientation.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Layout/Orientation.php deleted file mode 100644 index 2bd4b26107da..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Layout/Orientation.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.documentai.v1.Document.Page.Layout.Orientation - */ -class Orientation -{ - /** - * Unspecified orientation. - * - * Generated from protobuf enum ORIENTATION_UNSPECIFIED = 0; - */ - const ORIENTATION_UNSPECIFIED = 0; - /** - * Orientation is aligned with page up. - * - * Generated from protobuf enum PAGE_UP = 1; - */ - const PAGE_UP = 1; - /** - * Orientation is aligned with page right. - * Turn the head 90 degrees clockwise from upright to read. - * - * Generated from protobuf enum PAGE_RIGHT = 2; - */ - const PAGE_RIGHT = 2; - /** - * Orientation is aligned with page down. - * Turn the head 180 degrees from upright to read. - * - * Generated from protobuf enum PAGE_DOWN = 3; - */ - const PAGE_DOWN = 3; - /** - * Orientation is aligned with page left. - * Turn the head 90 degrees counterclockwise from upright to read. - * - * Generated from protobuf enum PAGE_LEFT = 4; - */ - const PAGE_LEFT = 4; - - private static $valueToName = [ - self::ORIENTATION_UNSPECIFIED => 'ORIENTATION_UNSPECIFIED', - self::PAGE_UP => 'PAGE_UP', - self::PAGE_RIGHT => 'PAGE_RIGHT', - self::PAGE_DOWN => 'PAGE_DOWN', - self::PAGE_LEFT => 'PAGE_LEFT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Line.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Line.php deleted file mode 100644 index 6b72b04f81b7..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Line.php +++ /dev/null @@ -1,171 +0,0 @@ -google.cloud.documentai.v1.Document.Page.Line - */ -class Line extends \Google\Protobuf\Internal\Message -{ - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Line][google.cloud.documentai.v1.Document.Page.Line]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; - */ - protected $layout = null; - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 2; - */ - private $detected_languages; - /** - * The history of this annotation. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; - * @deprecated - */ - protected $provenance = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Line][google.cloud.documentai.v1.Document.Page.Line]. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $detected_languages - * A list of detected languages together with confidence. - * @type \Google\Cloud\DocumentAI\V1\Document\Provenance $provenance - * The history of this annotation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Line][google.cloud.documentai.v1.Document.Page.Line]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; - * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null - */ - public function getLayout() - { - return $this->layout; - } - - public function hasLayout() - { - return isset($this->layout); - } - - public function clearLayout() - { - unset($this->layout); - } - - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Line][google.cloud.documentai.v1.Document.Page.Line]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var - * @return $this - */ - public function setLayout($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Layout::class); - $this->layout = $var; - - return $this; - } - - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 2; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage> - */ - public function getDetectedLanguages() - { - return $this->detected_languages; - } - - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 2; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $var - * @return $this - */ - public function setDetectedLanguages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage::class); - $this->detected_languages = $arr; - - return $this; - } - - /** - * The history of this annotation. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; - * @return \Google\Cloud\DocumentAI\V1\Document\Provenance|null - * @deprecated - */ - public function getProvenance() - { - if (isset($this->provenance)) { - @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); - } - return $this->provenance; - } - - public function hasProvenance() - { - if (isset($this->provenance)) { - @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); - } - return isset($this->provenance); - } - - public function clearProvenance() - { - @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); - unset($this->provenance); - } - - /** - * The history of this annotation. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; - * @param \Google\Cloud\DocumentAI\V1\Document\Provenance $var - * @return $this - * @deprecated - */ - public function setProvenance($var) - { - @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Provenance::class); - $this->provenance = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Matrix.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Matrix.php deleted file mode 100644 index 6a9d1afb0af2..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Matrix.php +++ /dev/null @@ -1,182 +0,0 @@ -google.cloud.documentai.v1.Document.Page.Matrix - */ -class Matrix extends \Google\Protobuf\Internal\Message -{ - /** - * Number of rows in the matrix. - * - * Generated from protobuf field int32 rows = 1; - */ - protected $rows = 0; - /** - * Number of columns in the matrix. - * - * Generated from protobuf field int32 cols = 2; - */ - protected $cols = 0; - /** - * This encodes information about what data type the matrix uses. - * For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list - * of OpenCV primitive data types, please refer to - * https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html - * - * Generated from protobuf field int32 type = 3; - */ - protected $type = 0; - /** - * The matrix data. - * - * Generated from protobuf field bytes data = 4; - */ - protected $data = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $rows - * Number of rows in the matrix. - * @type int $cols - * Number of columns in the matrix. - * @type int $type - * This encodes information about what data type the matrix uses. - * For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list - * of OpenCV primitive data types, please refer to - * https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html - * @type string $data - * The matrix data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Number of rows in the matrix. - * - * Generated from protobuf field int32 rows = 1; - * @return int - */ - public function getRows() - { - return $this->rows; - } - - /** - * Number of rows in the matrix. - * - * Generated from protobuf field int32 rows = 1; - * @param int $var - * @return $this - */ - public function setRows($var) - { - GPBUtil::checkInt32($var); - $this->rows = $var; - - return $this; - } - - /** - * Number of columns in the matrix. - * - * Generated from protobuf field int32 cols = 2; - * @return int - */ - public function getCols() - { - return $this->cols; - } - - /** - * Number of columns in the matrix. - * - * Generated from protobuf field int32 cols = 2; - * @param int $var - * @return $this - */ - public function setCols($var) - { - GPBUtil::checkInt32($var); - $this->cols = $var; - - return $this; - } - - /** - * This encodes information about what data type the matrix uses. - * For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list - * of OpenCV primitive data types, please refer to - * https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html - * - * Generated from protobuf field int32 type = 3; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * This encodes information about what data type the matrix uses. - * For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list - * of OpenCV primitive data types, please refer to - * https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html - * - * Generated from protobuf field int32 type = 3; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkInt32($var); - $this->type = $var; - - return $this; - } - - /** - * The matrix data. - * - * Generated from protobuf field bytes data = 4; - * @return string - */ - public function getData() - { - return $this->data; - } - - /** - * The matrix data. - * - * Generated from protobuf field bytes data = 4; - * @param string $var - * @return $this - */ - public function setData($var) - { - GPBUtil::checkString($var, False); - $this->data = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Paragraph.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Paragraph.php deleted file mode 100644 index f5b43941a26c..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Paragraph.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.documentai.v1.Document.Page.Paragraph - */ -class Paragraph extends \Google\Protobuf\Internal\Message -{ - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Paragraph][google.cloud.documentai.v1.Document.Page.Paragraph]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; - */ - protected $layout = null; - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 2; - */ - private $detected_languages; - /** - * The history of this annotation. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; - * @deprecated - */ - protected $provenance = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Paragraph][google.cloud.documentai.v1.Document.Page.Paragraph]. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $detected_languages - * A list of detected languages together with confidence. - * @type \Google\Cloud\DocumentAI\V1\Document\Provenance $provenance - * The history of this annotation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Paragraph][google.cloud.documentai.v1.Document.Page.Paragraph]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; - * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null - */ - public function getLayout() - { - return $this->layout; - } - - public function hasLayout() - { - return isset($this->layout); - } - - public function clearLayout() - { - unset($this->layout); - } - - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Paragraph][google.cloud.documentai.v1.Document.Page.Paragraph]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var - * @return $this - */ - public function setLayout($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Layout::class); - $this->layout = $var; - - return $this; - } - - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 2; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage> - */ - public function getDetectedLanguages() - { - return $this->detected_languages; - } - - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 2; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $var - * @return $this - */ - public function setDetectedLanguages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage::class); - $this->detected_languages = $arr; - - return $this; - } - - /** - * The history of this annotation. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; - * @return \Google\Cloud\DocumentAI\V1\Document\Provenance|null - * @deprecated - */ - public function getProvenance() - { - if (isset($this->provenance)) { - @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); - } - return $this->provenance; - } - - public function hasProvenance() - { - if (isset($this->provenance)) { - @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); - } - return isset($this->provenance); - } - - public function clearProvenance() - { - @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); - unset($this->provenance); - } - - /** - * The history of this annotation. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; - * @param \Google\Cloud\DocumentAI\V1\Document\Provenance $var - * @return $this - * @deprecated - */ - public function setProvenance($var) - { - @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Provenance::class); - $this->provenance = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Symbol.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Symbol.php deleted file mode 100644 index 2216e83330ca..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Symbol.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.documentai.v1.Document.Page.Symbol - */ -class Symbol extends \Google\Protobuf\Internal\Message -{ - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Symbol][google.cloud.documentai.v1.Document.Page.Symbol]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; - */ - protected $layout = null; - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 2; - */ - private $detected_languages; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Symbol][google.cloud.documentai.v1.Document.Page.Symbol]. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $detected_languages - * A list of detected languages together with confidence. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Symbol][google.cloud.documentai.v1.Document.Page.Symbol]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; - * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null - */ - public function getLayout() - { - return $this->layout; - } - - public function hasLayout() - { - return isset($this->layout); - } - - public function clearLayout() - { - unset($this->layout); - } - - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Symbol][google.cloud.documentai.v1.Document.Page.Symbol]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var - * @return $this - */ - public function setLayout($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Layout::class); - $this->layout = $var; - - return $this; - } - - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 2; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage> - */ - public function getDetectedLanguages() - { - return $this->detected_languages; - } - - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 2; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $var - * @return $this - */ - public function setDetectedLanguages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage::class); - $this->detected_languages = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Table.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Table.php deleted file mode 100644 index a15ec94d9e91..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Table.php +++ /dev/null @@ -1,238 +0,0 @@ -google.cloud.documentai.v1.Document.Page.Table - */ -class Table extends \Google\Protobuf\Internal\Message -{ - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Table][google.cloud.documentai.v1.Document.Page.Table]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; - */ - protected $layout = null; - /** - * Header rows of the table. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Table.TableRow header_rows = 2; - */ - private $header_rows; - /** - * Body rows of the table. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Table.TableRow body_rows = 3; - */ - private $body_rows; - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 4; - */ - private $detected_languages; - /** - * The history of this table. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 5 [deprecated = true]; - * @deprecated - */ - protected $provenance = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Table][google.cloud.documentai.v1.Document.Page.Table]. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\Table\TableRow[] $header_rows - * Header rows of the table. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\Table\TableRow[] $body_rows - * Body rows of the table. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $detected_languages - * A list of detected languages together with confidence. - * @type \Google\Cloud\DocumentAI\V1\Document\Provenance $provenance - * The history of this table. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Table][google.cloud.documentai.v1.Document.Page.Table]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; - * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null - */ - public function getLayout() - { - return $this->layout; - } - - public function hasLayout() - { - return isset($this->layout); - } - - public function clearLayout() - { - unset($this->layout); - } - - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Table][google.cloud.documentai.v1.Document.Page.Table]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var - * @return $this - */ - public function setLayout($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Layout::class); - $this->layout = $var; - - return $this; - } - - /** - * Header rows of the table. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Table.TableRow header_rows = 2; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\Table\TableRow> - */ - public function getHeaderRows() - { - return $this->header_rows; - } - - /** - * Header rows of the table. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Table.TableRow header_rows = 2; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\Table\TableRow[] $var - * @return $this - */ - public function setHeaderRows($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\Table\TableRow::class); - $this->header_rows = $arr; - - return $this; - } - - /** - * Body rows of the table. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Table.TableRow body_rows = 3; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\Table\TableRow> - */ - public function getBodyRows() - { - return $this->body_rows; - } - - /** - * Body rows of the table. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Table.TableRow body_rows = 3; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\Table\TableRow[] $var - * @return $this - */ - public function setBodyRows($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\Table\TableRow::class); - $this->body_rows = $arr; - - return $this; - } - - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 4; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage> - */ - public function getDetectedLanguages() - { - return $this->detected_languages; - } - - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 4; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $var - * @return $this - */ - public function setDetectedLanguages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage::class); - $this->detected_languages = $arr; - - return $this; - } - - /** - * The history of this table. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 5 [deprecated = true]; - * @return \Google\Cloud\DocumentAI\V1\Document\Provenance|null - * @deprecated - */ - public function getProvenance() - { - if (isset($this->provenance)) { - @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); - } - return $this->provenance; - } - - public function hasProvenance() - { - if (isset($this->provenance)) { - @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); - } - return isset($this->provenance); - } - - public function clearProvenance() - { - @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); - unset($this->provenance); - } - - /** - * The history of this table. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 5 [deprecated = true]; - * @param \Google\Cloud\DocumentAI\V1\Document\Provenance $var - * @return $this - * @deprecated - */ - public function setProvenance($var) - { - @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Provenance::class); - $this->provenance = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Table/TableCell.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Table/TableCell.php deleted file mode 100644 index b595f6f00ec3..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Table/TableCell.php +++ /dev/null @@ -1,183 +0,0 @@ -google.cloud.documentai.v1.Document.Page.Table.TableCell - */ -class TableCell extends \Google\Protobuf\Internal\Message -{ - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [TableCell][google.cloud.documentai.v1.Document.Page.Table.TableCell]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; - */ - protected $layout = null; - /** - * How many rows this cell spans. - * - * Generated from protobuf field int32 row_span = 2; - */ - protected $row_span = 0; - /** - * How many columns this cell spans. - * - * Generated from protobuf field int32 col_span = 3; - */ - protected $col_span = 0; - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 4; - */ - private $detected_languages; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [TableCell][google.cloud.documentai.v1.Document.Page.Table.TableCell]. - * @type int $row_span - * How many rows this cell spans. - * @type int $col_span - * How many columns this cell spans. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $detected_languages - * A list of detected languages together with confidence. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [TableCell][google.cloud.documentai.v1.Document.Page.Table.TableCell]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; - * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null - */ - public function getLayout() - { - return $this->layout; - } - - public function hasLayout() - { - return isset($this->layout); - } - - public function clearLayout() - { - unset($this->layout); - } - - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [TableCell][google.cloud.documentai.v1.Document.Page.Table.TableCell]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var - * @return $this - */ - public function setLayout($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Layout::class); - $this->layout = $var; - - return $this; - } - - /** - * How many rows this cell spans. - * - * Generated from protobuf field int32 row_span = 2; - * @return int - */ - public function getRowSpan() - { - return $this->row_span; - } - - /** - * How many rows this cell spans. - * - * Generated from protobuf field int32 row_span = 2; - * @param int $var - * @return $this - */ - public function setRowSpan($var) - { - GPBUtil::checkInt32($var); - $this->row_span = $var; - - return $this; - } - - /** - * How many columns this cell spans. - * - * Generated from protobuf field int32 col_span = 3; - * @return int - */ - public function getColSpan() - { - return $this->col_span; - } - - /** - * How many columns this cell spans. - * - * Generated from protobuf field int32 col_span = 3; - * @param int $var - * @return $this - */ - public function setColSpan($var) - { - GPBUtil::checkInt32($var); - $this->col_span = $var; - - return $this; - } - - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 4; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage> - */ - public function getDetectedLanguages() - { - return $this->detected_languages; - } - - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 4; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $var - * @return $this - */ - public function setDetectedLanguages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage::class); - $this->detected_languages = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Table/TableRow.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Table/TableRow.php deleted file mode 100644 index 4b978d57ab7e..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Table/TableRow.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.documentai.v1.Document.Page.Table.TableRow - */ -class TableRow extends \Google\Protobuf\Internal\Message -{ - /** - * Cells that make up this row. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Table.TableCell cells = 1; - */ - private $cells; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Document\Page\Table\TableCell[] $cells - * Cells that make up this row. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Cells that make up this row. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Table.TableCell cells = 1; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\Table\TableCell> - */ - public function getCells() - { - return $this->cells; - } - - /** - * Cells that make up this row. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.Table.TableCell cells = 1; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\Table\TableCell[] $var - * @return $this - */ - public function setCells($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\Table\TableCell::class); - $this->cells = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token.php deleted file mode 100644 index a2c9f5e1d290..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token.php +++ /dev/null @@ -1,262 +0,0 @@ -google.cloud.documentai.v1.Document.Page.Token - */ -class Token extends \Google\Protobuf\Internal\Message -{ - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Token][google.cloud.documentai.v1.Document.Page.Token]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; - */ - protected $layout = null; - /** - * Detected break at the end of a - * [Token][google.cloud.documentai.v1.Document.Page.Token]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Token.DetectedBreak detected_break = 2; - */ - protected $detected_break = null; - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 3; - */ - private $detected_languages; - /** - * The history of this annotation. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 4 [deprecated = true]; - * @deprecated - */ - protected $provenance = null; - /** - * Text style attributes. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Token.StyleInfo style_info = 5; - */ - protected $style_info = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Token][google.cloud.documentai.v1.Document.Page.Token]. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\Token\DetectedBreak $detected_break - * Detected break at the end of a - * [Token][google.cloud.documentai.v1.Document.Page.Token]. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $detected_languages - * A list of detected languages together with confidence. - * @type \Google\Cloud\DocumentAI\V1\Document\Provenance $provenance - * The history of this annotation. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\Token\StyleInfo $style_info - * Text style attributes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Token][google.cloud.documentai.v1.Document.Page.Token]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; - * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null - */ - public function getLayout() - { - return $this->layout; - } - - public function hasLayout() - { - return isset($this->layout); - } - - public function clearLayout() - { - unset($this->layout); - } - - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Token][google.cloud.documentai.v1.Document.Page.Token]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var - * @return $this - */ - public function setLayout($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Layout::class); - $this->layout = $var; - - return $this; - } - - /** - * Detected break at the end of a - * [Token][google.cloud.documentai.v1.Document.Page.Token]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Token.DetectedBreak detected_break = 2; - * @return \Google\Cloud\DocumentAI\V1\Document\Page\Token\DetectedBreak|null - */ - public function getDetectedBreak() - { - return $this->detected_break; - } - - public function hasDetectedBreak() - { - return isset($this->detected_break); - } - - public function clearDetectedBreak() - { - unset($this->detected_break); - } - - /** - * Detected break at the end of a - * [Token][google.cloud.documentai.v1.Document.Page.Token]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Token.DetectedBreak detected_break = 2; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\Token\DetectedBreak $var - * @return $this - */ - public function setDetectedBreak($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Token\DetectedBreak::class); - $this->detected_break = $var; - - return $this; - } - - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 3; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage> - */ - public function getDetectedLanguages() - { - return $this->detected_languages; - } - - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 3; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $var - * @return $this - */ - public function setDetectedLanguages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage::class); - $this->detected_languages = $arr; - - return $this; - } - - /** - * The history of this annotation. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 4 [deprecated = true]; - * @return \Google\Cloud\DocumentAI\V1\Document\Provenance|null - * @deprecated - */ - public function getProvenance() - { - if (isset($this->provenance)) { - @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); - } - return $this->provenance; - } - - public function hasProvenance() - { - if (isset($this->provenance)) { - @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); - } - return isset($this->provenance); - } - - public function clearProvenance() - { - @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); - unset($this->provenance); - } - - /** - * The history of this annotation. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance provenance = 4 [deprecated = true]; - * @param \Google\Cloud\DocumentAI\V1\Document\Provenance $var - * @return $this - * @deprecated - */ - public function setProvenance($var) - { - @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Provenance::class); - $this->provenance = $var; - - return $this; - } - - /** - * Text style attributes. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Token.StyleInfo style_info = 5; - * @return \Google\Cloud\DocumentAI\V1\Document\Page\Token\StyleInfo|null - */ - public function getStyleInfo() - { - return $this->style_info; - } - - public function hasStyleInfo() - { - return isset($this->style_info); - } - - public function clearStyleInfo() - { - unset($this->style_info); - } - - /** - * Text style attributes. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Token.StyleInfo style_info = 5; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\Token\StyleInfo $var - * @return $this - */ - public function setStyleInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Token\StyleInfo::class); - $this->style_info = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token/DetectedBreak.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token/DetectedBreak.php deleted file mode 100644 index f1bb4fb29dc0..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token/DetectedBreak.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.documentai.v1.Document.Page.Token.DetectedBreak - */ -class DetectedBreak extends \Google\Protobuf\Internal\Message -{ - /** - * Detected break type. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Token.DetectedBreak.Type type = 1; - */ - protected $type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Detected break type. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Detected break type. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Token.DetectedBreak.Type type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Detected break type. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Token.DetectedBreak.Type type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\Document\Page\Token\DetectedBreak\Type::class); - $this->type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token/DetectedBreak/Type.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token/DetectedBreak/Type.php deleted file mode 100644 index c536ad1b6e11..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token/DetectedBreak/Type.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.documentai.v1.Document.Page.Token.DetectedBreak.Type - */ -class Type -{ - /** - * Unspecified break type. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * A single whitespace. - * - * Generated from protobuf enum SPACE = 1; - */ - const SPACE = 1; - /** - * A wider whitespace. - * - * Generated from protobuf enum WIDE_SPACE = 2; - */ - const WIDE_SPACE = 2; - /** - * A hyphen that indicates that a token has been split across lines. - * - * Generated from protobuf enum HYPHEN = 3; - */ - const HYPHEN = 3; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::SPACE => 'SPACE', - self::WIDE_SPACE => 'WIDE_SPACE', - self::HYPHEN => 'HYPHEN', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token/StyleInfo.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token/StyleInfo.php deleted file mode 100644 index c3ed9461ebb3..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/Token/StyleInfo.php +++ /dev/null @@ -1,583 +0,0 @@ -google.cloud.documentai.v1.Document.Page.Token.StyleInfo - */ -class StyleInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Font size in points (`1` point is `¹⁄₇₂` inches). - * - * Generated from protobuf field int32 font_size = 1; - */ - protected $font_size = 0; - /** - * Font size in pixels, equal to _unrounded - * [font_size][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_size]_ - * * _resolution_ ÷ `72.0`. - * - * Generated from protobuf field double pixel_font_size = 2; - */ - protected $pixel_font_size = 0.0; - /** - * Letter spacing in points. - * - * Generated from protobuf field double letter_spacing = 3; - */ - protected $letter_spacing = 0.0; - /** - * Name or style of the font. - * - * Generated from protobuf field string font_type = 4; - */ - protected $font_type = ''; - /** - * Whether the text is bold (equivalent to - * [font_weight][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_weight] - * is at least `700`). - * - * Generated from protobuf field bool bold = 5; - */ - protected $bold = false; - /** - * Whether the text is italic. - * - * Generated from protobuf field bool italic = 6; - */ - protected $italic = false; - /** - * Whether the text is underlined. - * - * Generated from protobuf field bool underlined = 7; - */ - protected $underlined = false; - /** - * Whether the text is strikethrough. This feature is not supported yet. - * - * Generated from protobuf field bool strikeout = 8; - */ - protected $strikeout = false; - /** - * Whether the text is a subscript. This feature is not supported yet. - * - * Generated from protobuf field bool subscript = 9; - */ - protected $subscript = false; - /** - * Whether the text is a superscript. This feature is not supported yet. - * - * Generated from protobuf field bool superscript = 10; - */ - protected $superscript = false; - /** - * Whether the text is in small caps. This feature is not supported yet. - * - * Generated from protobuf field bool smallcaps = 11; - */ - protected $smallcaps = false; - /** - * TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). - * Normal is `400`, bold is `700`. - * - * Generated from protobuf field int32 font_weight = 12; - */ - protected $font_weight = 0; - /** - * Whether the text is handwritten. - * - * Generated from protobuf field bool handwritten = 13; - */ - protected $handwritten = false; - /** - * Color of the text. - * - * Generated from protobuf field .google.type.Color text_color = 14; - */ - protected $text_color = null; - /** - * Color of the background. - * - * Generated from protobuf field .google.type.Color background_color = 15; - */ - protected $background_color = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $font_size - * Font size in points (`1` point is `¹⁄₇₂` inches). - * @type float $pixel_font_size - * Font size in pixels, equal to _unrounded - * [font_size][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_size]_ - * * _resolution_ ÷ `72.0`. - * @type float $letter_spacing - * Letter spacing in points. - * @type string $font_type - * Name or style of the font. - * @type bool $bold - * Whether the text is bold (equivalent to - * [font_weight][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_weight] - * is at least `700`). - * @type bool $italic - * Whether the text is italic. - * @type bool $underlined - * Whether the text is underlined. - * @type bool $strikeout - * Whether the text is strikethrough. This feature is not supported yet. - * @type bool $subscript - * Whether the text is a subscript. This feature is not supported yet. - * @type bool $superscript - * Whether the text is a superscript. This feature is not supported yet. - * @type bool $smallcaps - * Whether the text is in small caps. This feature is not supported yet. - * @type int $font_weight - * TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). - * Normal is `400`, bold is `700`. - * @type bool $handwritten - * Whether the text is handwritten. - * @type \Google\Type\Color $text_color - * Color of the text. - * @type \Google\Type\Color $background_color - * Color of the background. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Font size in points (`1` point is `¹⁄₇₂` inches). - * - * Generated from protobuf field int32 font_size = 1; - * @return int - */ - public function getFontSize() - { - return $this->font_size; - } - - /** - * Font size in points (`1` point is `¹⁄₇₂` inches). - * - * Generated from protobuf field int32 font_size = 1; - * @param int $var - * @return $this - */ - public function setFontSize($var) - { - GPBUtil::checkInt32($var); - $this->font_size = $var; - - return $this; - } - - /** - * Font size in pixels, equal to _unrounded - * [font_size][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_size]_ - * * _resolution_ ÷ `72.0`. - * - * Generated from protobuf field double pixel_font_size = 2; - * @return float - */ - public function getPixelFontSize() - { - return $this->pixel_font_size; - } - - /** - * Font size in pixels, equal to _unrounded - * [font_size][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_size]_ - * * _resolution_ ÷ `72.0`. - * - * Generated from protobuf field double pixel_font_size = 2; - * @param float $var - * @return $this - */ - public function setPixelFontSize($var) - { - GPBUtil::checkDouble($var); - $this->pixel_font_size = $var; - - return $this; - } - - /** - * Letter spacing in points. - * - * Generated from protobuf field double letter_spacing = 3; - * @return float - */ - public function getLetterSpacing() - { - return $this->letter_spacing; - } - - /** - * Letter spacing in points. - * - * Generated from protobuf field double letter_spacing = 3; - * @param float $var - * @return $this - */ - public function setLetterSpacing($var) - { - GPBUtil::checkDouble($var); - $this->letter_spacing = $var; - - return $this; - } - - /** - * Name or style of the font. - * - * Generated from protobuf field string font_type = 4; - * @return string - */ - public function getFontType() - { - return $this->font_type; - } - - /** - * Name or style of the font. - * - * Generated from protobuf field string font_type = 4; - * @param string $var - * @return $this - */ - public function setFontType($var) - { - GPBUtil::checkString($var, True); - $this->font_type = $var; - - return $this; - } - - /** - * Whether the text is bold (equivalent to - * [font_weight][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_weight] - * is at least `700`). - * - * Generated from protobuf field bool bold = 5; - * @return bool - */ - public function getBold() - { - return $this->bold; - } - - /** - * Whether the text is bold (equivalent to - * [font_weight][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_weight] - * is at least `700`). - * - * Generated from protobuf field bool bold = 5; - * @param bool $var - * @return $this - */ - public function setBold($var) - { - GPBUtil::checkBool($var); - $this->bold = $var; - - return $this; - } - - /** - * Whether the text is italic. - * - * Generated from protobuf field bool italic = 6; - * @return bool - */ - public function getItalic() - { - return $this->italic; - } - - /** - * Whether the text is italic. - * - * Generated from protobuf field bool italic = 6; - * @param bool $var - * @return $this - */ - public function setItalic($var) - { - GPBUtil::checkBool($var); - $this->italic = $var; - - return $this; - } - - /** - * Whether the text is underlined. - * - * Generated from protobuf field bool underlined = 7; - * @return bool - */ - public function getUnderlined() - { - return $this->underlined; - } - - /** - * Whether the text is underlined. - * - * Generated from protobuf field bool underlined = 7; - * @param bool $var - * @return $this - */ - public function setUnderlined($var) - { - GPBUtil::checkBool($var); - $this->underlined = $var; - - return $this; - } - - /** - * Whether the text is strikethrough. This feature is not supported yet. - * - * Generated from protobuf field bool strikeout = 8; - * @return bool - */ - public function getStrikeout() - { - return $this->strikeout; - } - - /** - * Whether the text is strikethrough. This feature is not supported yet. - * - * Generated from protobuf field bool strikeout = 8; - * @param bool $var - * @return $this - */ - public function setStrikeout($var) - { - GPBUtil::checkBool($var); - $this->strikeout = $var; - - return $this; - } - - /** - * Whether the text is a subscript. This feature is not supported yet. - * - * Generated from protobuf field bool subscript = 9; - * @return bool - */ - public function getSubscript() - { - return $this->subscript; - } - - /** - * Whether the text is a subscript. This feature is not supported yet. - * - * Generated from protobuf field bool subscript = 9; - * @param bool $var - * @return $this - */ - public function setSubscript($var) - { - GPBUtil::checkBool($var); - $this->subscript = $var; - - return $this; - } - - /** - * Whether the text is a superscript. This feature is not supported yet. - * - * Generated from protobuf field bool superscript = 10; - * @return bool - */ - public function getSuperscript() - { - return $this->superscript; - } - - /** - * Whether the text is a superscript. This feature is not supported yet. - * - * Generated from protobuf field bool superscript = 10; - * @param bool $var - * @return $this - */ - public function setSuperscript($var) - { - GPBUtil::checkBool($var); - $this->superscript = $var; - - return $this; - } - - /** - * Whether the text is in small caps. This feature is not supported yet. - * - * Generated from protobuf field bool smallcaps = 11; - * @return bool - */ - public function getSmallcaps() - { - return $this->smallcaps; - } - - /** - * Whether the text is in small caps. This feature is not supported yet. - * - * Generated from protobuf field bool smallcaps = 11; - * @param bool $var - * @return $this - */ - public function setSmallcaps($var) - { - GPBUtil::checkBool($var); - $this->smallcaps = $var; - - return $this; - } - - /** - * TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). - * Normal is `400`, bold is `700`. - * - * Generated from protobuf field int32 font_weight = 12; - * @return int - */ - public function getFontWeight() - { - return $this->font_weight; - } - - /** - * TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). - * Normal is `400`, bold is `700`. - * - * Generated from protobuf field int32 font_weight = 12; - * @param int $var - * @return $this - */ - public function setFontWeight($var) - { - GPBUtil::checkInt32($var); - $this->font_weight = $var; - - return $this; - } - - /** - * Whether the text is handwritten. - * - * Generated from protobuf field bool handwritten = 13; - * @return bool - */ - public function getHandwritten() - { - return $this->handwritten; - } - - /** - * Whether the text is handwritten. - * - * Generated from protobuf field bool handwritten = 13; - * @param bool $var - * @return $this - */ - public function setHandwritten($var) - { - GPBUtil::checkBool($var); - $this->handwritten = $var; - - return $this; - } - - /** - * Color of the text. - * - * Generated from protobuf field .google.type.Color text_color = 14; - * @return \Google\Type\Color|null - */ - public function getTextColor() - { - return $this->text_color; - } - - public function hasTextColor() - { - return isset($this->text_color); - } - - public function clearTextColor() - { - unset($this->text_color); - } - - /** - * Color of the text. - * - * Generated from protobuf field .google.type.Color text_color = 14; - * @param \Google\Type\Color $var - * @return $this - */ - public function setTextColor($var) - { - GPBUtil::checkMessage($var, \Google\Type\Color::class); - $this->text_color = $var; - - return $this; - } - - /** - * Color of the background. - * - * Generated from protobuf field .google.type.Color background_color = 15; - * @return \Google\Type\Color|null - */ - public function getBackgroundColor() - { - return $this->background_color; - } - - public function hasBackgroundColor() - { - return isset($this->background_color); - } - - public function clearBackgroundColor() - { - unset($this->background_color); - } - - /** - * Color of the background. - * - * Generated from protobuf field .google.type.Color background_color = 15; - * @param \Google\Type\Color $var - * @return $this - */ - public function setBackgroundColor($var) - { - GPBUtil::checkMessage($var, \Google\Type\Color::class); - $this->background_color = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/VisualElement.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/VisualElement.php deleted file mode 100644 index ead412d26c3a..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Page/VisualElement.php +++ /dev/null @@ -1,154 +0,0 @@ -google.cloud.documentai.v1.Document.Page.VisualElement - */ -class VisualElement extends \Google\Protobuf\Internal\Message -{ - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; - */ - protected $layout = null; - /** - * Type of the - * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. - * - * Generated from protobuf field string type = 2; - */ - protected $type = ''; - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 3; - */ - private $detected_languages; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. - * @type string $type - * Type of the - * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. - * @type \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $detected_languages - * A list of detected languages together with confidence. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; - * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null - */ - public function getLayout() - { - return $this->layout; - } - - public function hasLayout() - { - return isset($this->layout); - } - - public function clearLayout() - { - unset($this->layout); - } - - /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var - * @return $this - */ - public function setLayout($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Page\Layout::class); - $this->layout = $var; - - return $this; - } - - /** - * Type of the - * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. - * - * Generated from protobuf field string type = 2; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Type of the - * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. - * - * Generated from protobuf field string type = 2; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 3; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage> - */ - public function getDetectedLanguages() - { - return $this->detected_languages; - } - - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Page.DetectedLanguage detected_languages = 3; - * @param \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage[] $var - * @return $this - */ - public function setDetectedLanguages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage::class); - $this->detected_languages = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/PageAnchor.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/PageAnchor.php deleted file mode 100644 index 08c07c1f2a3a..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/PageAnchor.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.documentai.v1.Document.PageAnchor - */ -class PageAnchor extends \Google\Protobuf\Internal\Message -{ - /** - * One or more references to visual page elements - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.PageAnchor.PageRef page_refs = 1; - */ - private $page_refs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Document\PageAnchor\PageRef[] $page_refs - * One or more references to visual page elements - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * One or more references to visual page elements - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.PageAnchor.PageRef page_refs = 1; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\PageAnchor\PageRef> - */ - public function getPageRefs() - { - return $this->page_refs; - } - - /** - * One or more references to visual page elements - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.PageAnchor.PageRef page_refs = 1; - * @param \Google\Cloud\DocumentAI\V1\Document\PageAnchor\PageRef[] $var - * @return $this - */ - public function setPageRefs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\PageAnchor\PageRef::class); - $this->page_refs = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/PageAnchor/PageRef.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/PageAnchor/PageRef.php deleted file mode 100644 index 240a39c2151e..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/PageAnchor/PageRef.php +++ /dev/null @@ -1,264 +0,0 @@ -google.cloud.documentai.v1.Document.PageAnchor.PageRef - */ -class PageRef extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Index into the - * [Document.pages][google.cloud.documentai.v1.Document.pages] element, - * for example using - * `[Document.pages][page_refs.page]` to locate the related page element. - * This field is skipped when its value is the default `0`. See - * https://developers.google.com/protocol-buffers/docs/proto3#json. - * - * Generated from protobuf field int64 page = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $page = 0; - /** - * Optional. The type of the layout element that is being referenced if - * any. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.PageAnchor.PageRef.LayoutType layout_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $layout_type = 0; - /** - * Optional. Deprecated. Use - * [PageRef.bounding_poly][google.cloud.documentai.v1.Document.PageAnchor.PageRef.bounding_poly] - * instead. - * - * Generated from protobuf field string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @deprecated - */ - protected $layout_id = ''; - /** - * Optional. Identifies the bounding polygon of a layout element on the - * page. If `layout_type` is set, the bounding polygon must be exactly the - * same to the layout element it's referring to. - * - * Generated from protobuf field .google.cloud.documentai.v1.BoundingPoly bounding_poly = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $bounding_poly = null; - /** - * Optional. Confidence of detected page element, if applicable. Range - * `[0, 1]`. - * - * Generated from protobuf field float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $page - * Required. Index into the - * [Document.pages][google.cloud.documentai.v1.Document.pages] element, - * for example using - * `[Document.pages][page_refs.page]` to locate the related page element. - * This field is skipped when its value is the default `0`. See - * https://developers.google.com/protocol-buffers/docs/proto3#json. - * @type int $layout_type - * Optional. The type of the layout element that is being referenced if - * any. - * @type string $layout_id - * Optional. Deprecated. Use - * [PageRef.bounding_poly][google.cloud.documentai.v1.Document.PageAnchor.PageRef.bounding_poly] - * instead. - * @type \Google\Cloud\DocumentAI\V1\BoundingPoly $bounding_poly - * Optional. Identifies the bounding polygon of a layout element on the - * page. If `layout_type` is set, the bounding polygon must be exactly the - * same to the layout element it's referring to. - * @type float $confidence - * Optional. Confidence of detected page element, if applicable. Range - * `[0, 1]`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Required. Index into the - * [Document.pages][google.cloud.documentai.v1.Document.pages] element, - * for example using - * `[Document.pages][page_refs.page]` to locate the related page element. - * This field is skipped when its value is the default `0`. See - * https://developers.google.com/protocol-buffers/docs/proto3#json. - * - * Generated from protobuf field int64 page = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int|string - */ - public function getPage() - { - return $this->page; - } - - /** - * Required. Index into the - * [Document.pages][google.cloud.documentai.v1.Document.pages] element, - * for example using - * `[Document.pages][page_refs.page]` to locate the related page element. - * This field is skipped when its value is the default `0`. See - * https://developers.google.com/protocol-buffers/docs/proto3#json. - * - * Generated from protobuf field int64 page = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int|string $var - * @return $this - */ - public function setPage($var) - { - GPBUtil::checkInt64($var); - $this->page = $var; - - return $this; - } - - /** - * Optional. The type of the layout element that is being referenced if - * any. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.PageAnchor.PageRef.LayoutType layout_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getLayoutType() - { - return $this->layout_type; - } - - /** - * Optional. The type of the layout element that is being referenced if - * any. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.PageAnchor.PageRef.LayoutType layout_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setLayoutType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\Document\PageAnchor\PageRef\LayoutType::class); - $this->layout_type = $var; - - return $this; - } - - /** - * Optional. Deprecated. Use - * [PageRef.bounding_poly][google.cloud.documentai.v1.Document.PageAnchor.PageRef.bounding_poly] - * instead. - * - * Generated from protobuf field string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @return string - * @deprecated - */ - public function getLayoutId() - { - if ($this->layout_id !== '') { - @trigger_error('layout_id is deprecated.', E_USER_DEPRECATED); - } - return $this->layout_id; - } - - /** - * Optional. Deprecated. Use - * [PageRef.bounding_poly][google.cloud.documentai.v1.Document.PageAnchor.PageRef.bounding_poly] - * instead. - * - * Generated from protobuf field string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - * @deprecated - */ - public function setLayoutId($var) - { - @trigger_error('layout_id is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->layout_id = $var; - - return $this; - } - - /** - * Optional. Identifies the bounding polygon of a layout element on the - * page. If `layout_type` is set, the bounding polygon must be exactly the - * same to the layout element it's referring to. - * - * Generated from protobuf field .google.cloud.documentai.v1.BoundingPoly bounding_poly = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\DocumentAI\V1\BoundingPoly|null - */ - public function getBoundingPoly() - { - return $this->bounding_poly; - } - - public function hasBoundingPoly() - { - return isset($this->bounding_poly); - } - - public function clearBoundingPoly() - { - unset($this->bounding_poly); - } - - /** - * Optional. Identifies the bounding polygon of a layout element on the - * page. If `layout_type` is set, the bounding polygon must be exactly the - * same to the layout element it's referring to. - * - * Generated from protobuf field .google.cloud.documentai.v1.BoundingPoly bounding_poly = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\DocumentAI\V1\BoundingPoly $var - * @return $this - */ - public function setBoundingPoly($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\BoundingPoly::class); - $this->bounding_poly = $var; - - return $this; - } - - /** - * Optional. Confidence of detected page element, if applicable. Range - * `[0, 1]`. - * - * Generated from protobuf field float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * Optional. Confidence of detected page element, if applicable. Range - * `[0, 1]`. - * - * Generated from protobuf field float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/PageAnchor/PageRef/LayoutType.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/PageAnchor/PageRef/LayoutType.php deleted file mode 100644 index b98beb7e6e5f..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/PageAnchor/PageRef/LayoutType.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.documentai.v1.Document.PageAnchor.PageRef.LayoutType - */ -class LayoutType -{ - /** - * Layout Unspecified. - * - * Generated from protobuf enum LAYOUT_TYPE_UNSPECIFIED = 0; - */ - const LAYOUT_TYPE_UNSPECIFIED = 0; - /** - * References a - * [Page.blocks][google.cloud.documentai.v1.Document.Page.blocks] - * element. - * - * Generated from protobuf enum BLOCK = 1; - */ - const BLOCK = 1; - /** - * References a - * [Page.paragraphs][google.cloud.documentai.v1.Document.Page.paragraphs] - * element. - * - * Generated from protobuf enum PARAGRAPH = 2; - */ - const PARAGRAPH = 2; - /** - * References a - * [Page.lines][google.cloud.documentai.v1.Document.Page.lines] element. - * - * Generated from protobuf enum LINE = 3; - */ - const LINE = 3; - /** - * References a - * [Page.tokens][google.cloud.documentai.v1.Document.Page.tokens] - * element. - * - * Generated from protobuf enum TOKEN = 4; - */ - const TOKEN = 4; - /** - * References a - * [Page.visual_elements][google.cloud.documentai.v1.Document.Page.visual_elements] - * element. - * - * Generated from protobuf enum VISUAL_ELEMENT = 5; - */ - const VISUAL_ELEMENT = 5; - /** - * Refrrences a - * [Page.tables][google.cloud.documentai.v1.Document.Page.tables] - * element. - * - * Generated from protobuf enum TABLE = 6; - */ - const TABLE = 6; - /** - * References a - * [Page.form_fields][google.cloud.documentai.v1.Document.Page.form_fields] - * element. - * - * Generated from protobuf enum FORM_FIELD = 7; - */ - const FORM_FIELD = 7; - - private static $valueToName = [ - self::LAYOUT_TYPE_UNSPECIFIED => 'LAYOUT_TYPE_UNSPECIFIED', - self::BLOCK => 'BLOCK', - self::PARAGRAPH => 'PARAGRAPH', - self::LINE => 'LINE', - self::TOKEN => 'TOKEN', - self::VISUAL_ELEMENT => 'VISUAL_ELEMENT', - self::TABLE => 'TABLE', - self::FORM_FIELD => 'FORM_FIELD', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Provenance.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Provenance.php deleted file mode 100644 index a8282aca2592..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Provenance.php +++ /dev/null @@ -1,188 +0,0 @@ -google.cloud.documentai.v1.Document.Provenance - */ -class Provenance extends \Google\Protobuf\Internal\Message -{ - /** - * The index of the revision that produced this element. - * - * Generated from protobuf field int32 revision = 1 [deprecated = true]; - * @deprecated - */ - protected $revision = 0; - /** - * The Id of this operation. Needs to be unique within the scope of the - * revision. - * - * Generated from protobuf field int32 id = 2 [deprecated = true]; - * @deprecated - */ - protected $id = 0; - /** - * References to the original elements that are replaced. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Provenance.Parent parents = 3; - */ - private $parents; - /** - * The type of provenance operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance.OperationType type = 4; - */ - protected $type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $revision - * The index of the revision that produced this element. - * @type int $id - * The Id of this operation. Needs to be unique within the scope of the - * revision. - * @type \Google\Cloud\DocumentAI\V1\Document\Provenance\PBParent[] $parents - * References to the original elements that are replaced. - * @type int $type - * The type of provenance operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * The index of the revision that produced this element. - * - * Generated from protobuf field int32 revision = 1 [deprecated = true]; - * @return int - * @deprecated - */ - public function getRevision() - { - if ($this->revision !== 0) { - @trigger_error('revision is deprecated.', E_USER_DEPRECATED); - } - return $this->revision; - } - - /** - * The index of the revision that produced this element. - * - * Generated from protobuf field int32 revision = 1 [deprecated = true]; - * @param int $var - * @return $this - * @deprecated - */ - public function setRevision($var) - { - @trigger_error('revision is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkInt32($var); - $this->revision = $var; - - return $this; - } - - /** - * The Id of this operation. Needs to be unique within the scope of the - * revision. - * - * Generated from protobuf field int32 id = 2 [deprecated = true]; - * @return int - * @deprecated - */ - public function getId() - { - if ($this->id !== 0) { - @trigger_error('id is deprecated.', E_USER_DEPRECATED); - } - return $this->id; - } - - /** - * The Id of this operation. Needs to be unique within the scope of the - * revision. - * - * Generated from protobuf field int32 id = 2 [deprecated = true]; - * @param int $var - * @return $this - * @deprecated - */ - public function setId($var) - { - @trigger_error('id is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkInt32($var); - $this->id = $var; - - return $this; - } - - /** - * References to the original elements that are replaced. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Provenance.Parent parents = 3; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Provenance\PBParent> - */ - public function getParents() - { - return $this->parents; - } - - /** - * References to the original elements that are replaced. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Provenance.Parent parents = 3; - * @param \Google\Cloud\DocumentAI\V1\Document\Provenance\PBParent[] $var - * @return $this - */ - public function setParents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Provenance\PBParent::class); - $this->parents = $arr; - - return $this; - } - - /** - * The type of provenance operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance.OperationType type = 4; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of provenance operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Provenance.OperationType type = 4; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\Document\Provenance\OperationType::class); - $this->type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Provenance/OperationType.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Provenance/OperationType.php deleted file mode 100644 index b9cc53e04cc9..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Provenance/OperationType.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.documentai.v1.Document.Provenance.OperationType - */ -class OperationType -{ - /** - * Operation type unspecified. If no operation is specified a provenance - * entry is simply used to match against a `parent`. - * - * Generated from protobuf enum OPERATION_TYPE_UNSPECIFIED = 0; - */ - const OPERATION_TYPE_UNSPECIFIED = 0; - /** - * Add an element. - * - * Generated from protobuf enum ADD = 1; - */ - const ADD = 1; - /** - * Remove an element identified by `parent`. - * - * Generated from protobuf enum REMOVE = 2; - */ - const REMOVE = 2; - /** - * Updates any fields within the given provenance scope of the message. It - * overwrites the fields rather than replacing them. Use this when you - * want to update a field value of an entity without also updating all the - * child properties. - * - * Generated from protobuf enum UPDATE = 7; - */ - const UPDATE = 7; - /** - * Currently unused. Replace an element identified by `parent`. - * - * Generated from protobuf enum REPLACE = 3; - */ - const REPLACE = 3; - /** - * Deprecated. Request human review for the element identified by - * `parent`. - * - * Generated from protobuf enum EVAL_REQUESTED = 4 [deprecated = true]; - */ - const EVAL_REQUESTED = 4; - /** - * Deprecated. Element is reviewed and approved at human review, - * confidence will be set to 1.0. - * - * Generated from protobuf enum EVAL_APPROVED = 5 [deprecated = true]; - */ - const EVAL_APPROVED = 5; - /** - * Deprecated. Element is skipped in the validation process. - * - * Generated from protobuf enum EVAL_SKIPPED = 6 [deprecated = true]; - */ - const EVAL_SKIPPED = 6; - - private static $valueToName = [ - self::OPERATION_TYPE_UNSPECIFIED => 'OPERATION_TYPE_UNSPECIFIED', - self::ADD => 'ADD', - self::REMOVE => 'REMOVE', - self::UPDATE => 'UPDATE', - self::REPLACE => 'REPLACE', - self::EVAL_REQUESTED => 'EVAL_REQUESTED', - self::EVAL_APPROVED => 'EVAL_APPROVED', - self::EVAL_SKIPPED => 'EVAL_SKIPPED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Provenance/PBParent.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Provenance/PBParent.php deleted file mode 100644 index b23fffae3132..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Provenance/PBParent.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.documentai.v1.Document.Provenance.Parent - */ -class PBParent extends \Google\Protobuf\Internal\Message -{ - /** - * The index of the index into current revision's parent_ids list. - * - * Generated from protobuf field int32 revision = 1; - */ - protected $revision = 0; - /** - * The index of the parent item in the corresponding item list (eg. list - * of entities, properties within entities, etc.) in the parent revision. - * - * Generated from protobuf field int32 index = 3; - */ - protected $index = 0; - /** - * The id of the parent provenance. - * - * Generated from protobuf field int32 id = 2 [deprecated = true]; - * @deprecated - */ - protected $id = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $revision - * The index of the index into current revision's parent_ids list. - * @type int $index - * The index of the parent item in the corresponding item list (eg. list - * of entities, properties within entities, etc.) in the parent revision. - * @type int $id - * The id of the parent provenance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * The index of the index into current revision's parent_ids list. - * - * Generated from protobuf field int32 revision = 1; - * @return int - */ - public function getRevision() - { - return $this->revision; - } - - /** - * The index of the index into current revision's parent_ids list. - * - * Generated from protobuf field int32 revision = 1; - * @param int $var - * @return $this - */ - public function setRevision($var) - { - GPBUtil::checkInt32($var); - $this->revision = $var; - - return $this; - } - - /** - * The index of the parent item in the corresponding item list (eg. list - * of entities, properties within entities, etc.) in the parent revision. - * - * Generated from protobuf field int32 index = 3; - * @return int - */ - public function getIndex() - { - return $this->index; - } - - /** - * The index of the parent item in the corresponding item list (eg. list - * of entities, properties within entities, etc.) in the parent revision. - * - * Generated from protobuf field int32 index = 3; - * @param int $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkInt32($var); - $this->index = $var; - - return $this; - } - - /** - * The id of the parent provenance. - * - * Generated from protobuf field int32 id = 2 [deprecated = true]; - * @return int - * @deprecated - */ - public function getId() - { - if ($this->id !== 0) { - @trigger_error('id is deprecated.', E_USER_DEPRECATED); - } - return $this->id; - } - - /** - * The id of the parent provenance. - * - * Generated from protobuf field int32 id = 2 [deprecated = true]; - * @param int $var - * @return $this - * @deprecated - */ - public function setId($var) - { - @trigger_error('id is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkInt32($var); - $this->id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Revision.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Revision.php deleted file mode 100644 index e9767e3a5d3f..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Revision.php +++ /dev/null @@ -1,337 +0,0 @@ -google.cloud.documentai.v1.Document.Revision - */ -class Revision extends \Google\Protobuf\Internal\Message -{ - /** - * Id of the revision, internally generated by doc proto storage. - * Unique within the context of the document. - * - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - /** - * The revisions that this revision is based on. This can include one or - * more parent (when documents are merged.) This field represents the - * index into the `revisions` field. - * - * Generated from protobuf field repeated int32 parent = 2 [deprecated = true]; - * @deprecated - */ - private $parent; - /** - * The revisions that this revision is based on. Must include all the ids - * that have anything to do with this revision - eg. there are - * `provenance.parent.revision` fields that index into this field. - * - * Generated from protobuf field repeated string parent_ids = 7; - */ - private $parent_ids; - /** - * The time that the revision was created, internally generated by - * doc proto storage at the time of create. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - */ - protected $create_time = null; - /** - * Human Review information of this revision. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Revision.HumanReview human_review = 6; - */ - protected $human_review = null; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $agent - * If the change was made by a person specify the name or id of that - * person. - * @type string $processor - * If the annotation was made by processor identify the processor by its - * resource name. - * @type string $id - * Id of the revision, internally generated by doc proto storage. - * Unique within the context of the document. - * @type int[] $parent - * The revisions that this revision is based on. This can include one or - * more parent (when documents are merged.) This field represents the - * index into the `revisions` field. - * @type string[] $parent_ids - * The revisions that this revision is based on. Must include all the ids - * that have anything to do with this revision - eg. there are - * `provenance.parent.revision` fields that index into this field. - * @type \Google\Protobuf\Timestamp $create_time - * The time that the revision was created, internally generated by - * doc proto storage at the time of create. - * @type \Google\Cloud\DocumentAI\V1\Document\Revision\HumanReview $human_review - * Human Review information of this revision. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * If the change was made by a person specify the name or id of that - * person. - * - * Generated from protobuf field string agent = 4; - * @return string - */ - public function getAgent() - { - return $this->readOneof(4); - } - - public function hasAgent() - { - return $this->hasOneof(4); - } - - /** - * If the change was made by a person specify the name or id of that - * person. - * - * Generated from protobuf field string agent = 4; - * @param string $var - * @return $this - */ - public function setAgent($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * If the annotation was made by processor identify the processor by its - * resource name. - * - * Generated from protobuf field string processor = 5; - * @return string - */ - public function getProcessor() - { - return $this->readOneof(5); - } - - public function hasProcessor() - { - return $this->hasOneof(5); - } - - /** - * If the annotation was made by processor identify the processor by its - * resource name. - * - * Generated from protobuf field string processor = 5; - * @param string $var - * @return $this - */ - public function setProcessor($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Id of the revision, internally generated by doc proto storage. - * Unique within the context of the document. - * - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Id of the revision, internally generated by doc proto storage. - * Unique within the context of the document. - * - * Generated from protobuf field string id = 1; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * The revisions that this revision is based on. This can include one or - * more parent (when documents are merged.) This field represents the - * index into the `revisions` field. - * - * Generated from protobuf field repeated int32 parent = 2 [deprecated = true]; - * @return RepeatedField - * @deprecated - */ - public function getParent() - { - if ($this->parent->count() !== 0) { - @trigger_error('parent is deprecated.', E_USER_DEPRECATED); - } - return $this->parent; - } - - /** - * The revisions that this revision is based on. This can include one or - * more parent (when documents are merged.) This field represents the - * index into the `revisions` field. - * - * Generated from protobuf field repeated int32 parent = 2 [deprecated = true]; - * @param int[] $var - * @return $this - * @deprecated - */ - public function setParent($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - if ($arr->count() !== 0) { - @trigger_error('parent is deprecated.', E_USER_DEPRECATED); - } - $this->parent = $arr; - - return $this; - } - - /** - * The revisions that this revision is based on. Must include all the ids - * that have anything to do with this revision - eg. there are - * `provenance.parent.revision` fields that index into this field. - * - * Generated from protobuf field repeated string parent_ids = 7; - * @return RepeatedField - */ - public function getParentIds() - { - return $this->parent_ids; - } - - /** - * The revisions that this revision is based on. Must include all the ids - * that have anything to do with this revision - eg. there are - * `provenance.parent.revision` fields that index into this field. - * - * Generated from protobuf field repeated string parent_ids = 7; - * @param string[] $var - * @return $this - */ - public function setParentIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->parent_ids = $arr; - - return $this; - } - - /** - * The time that the revision was created, internally generated by - * doc proto storage at the time of create. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * The time that the revision was created, internally generated by - * doc proto storage at the time of create. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Human Review information of this revision. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Revision.HumanReview human_review = 6; - * @return \Google\Cloud\DocumentAI\V1\Document\Revision\HumanReview|null - */ - public function getHumanReview() - { - return $this->human_review; - } - - public function hasHumanReview() - { - return isset($this->human_review); - } - - public function clearHumanReview() - { - unset($this->human_review); - } - - /** - * Human Review information of this revision. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Revision.HumanReview human_review = 6; - * @param \Google\Cloud\DocumentAI\V1\Document\Revision\HumanReview $var - * @return $this - */ - public function setHumanReview($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Revision\HumanReview::class); - $this->human_review = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Revision/HumanReview.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Revision/HumanReview.php deleted file mode 100644 index 5db9c95244cf..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Revision/HumanReview.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.documentai.v1.Document.Revision.HumanReview - */ -class HumanReview extends \Google\Protobuf\Internal\Message -{ - /** - * Human review state. For example, `requested`, `succeeded`, `rejected`. - * - * Generated from protobuf field string state = 1; - */ - protected $state = ''; - /** - * A message providing more details about the current state of processing. - * For example, the rejection reason when the state is `rejected`. - * - * Generated from protobuf field string state_message = 2; - */ - protected $state_message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $state - * Human review state. For example, `requested`, `succeeded`, `rejected`. - * @type string $state_message - * A message providing more details about the current state of processing. - * For example, the rejection reason when the state is `rejected`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Human review state. For example, `requested`, `succeeded`, `rejected`. - * - * Generated from protobuf field string state = 1; - * @return string - */ - public function getState() - { - return $this->state; - } - - /** - * Human review state. For example, `requested`, `succeeded`, `rejected`. - * - * Generated from protobuf field string state = 1; - * @param string $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkString($var, True); - $this->state = $var; - - return $this; - } - - /** - * A message providing more details about the current state of processing. - * For example, the rejection reason when the state is `rejected`. - * - * Generated from protobuf field string state_message = 2; - * @return string - */ - public function getStateMessage() - { - return $this->state_message; - } - - /** - * A message providing more details about the current state of processing. - * For example, the rejection reason when the state is `rejected`. - * - * Generated from protobuf field string state_message = 2; - * @param string $var - * @return $this - */ - public function setStateMessage($var) - { - GPBUtil::checkString($var, True); - $this->state_message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ShardInfo.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ShardInfo.php deleted file mode 100644 index 1443552475ad..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/ShardInfo.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.documentai.v1.Document.ShardInfo - */ -class ShardInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The 0-based index of this shard. - * - * Generated from protobuf field int64 shard_index = 1; - */ - protected $shard_index = 0; - /** - * Total number of shards. - * - * Generated from protobuf field int64 shard_count = 2; - */ - protected $shard_count = 0; - /** - * The index of the first character in - * [Document.text][google.cloud.documentai.v1.Document.text] in the overall - * document global text. - * - * Generated from protobuf field int64 text_offset = 3; - */ - protected $text_offset = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $shard_index - * The 0-based index of this shard. - * @type int|string $shard_count - * Total number of shards. - * @type int|string $text_offset - * The index of the first character in - * [Document.text][google.cloud.documentai.v1.Document.text] in the overall - * document global text. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * The 0-based index of this shard. - * - * Generated from protobuf field int64 shard_index = 1; - * @return int|string - */ - public function getShardIndex() - { - return $this->shard_index; - } - - /** - * The 0-based index of this shard. - * - * Generated from protobuf field int64 shard_index = 1; - * @param int|string $var - * @return $this - */ - public function setShardIndex($var) - { - GPBUtil::checkInt64($var); - $this->shard_index = $var; - - return $this; - } - - /** - * Total number of shards. - * - * Generated from protobuf field int64 shard_count = 2; - * @return int|string - */ - public function getShardCount() - { - return $this->shard_count; - } - - /** - * Total number of shards. - * - * Generated from protobuf field int64 shard_count = 2; - * @param int|string $var - * @return $this - */ - public function setShardCount($var) - { - GPBUtil::checkInt64($var); - $this->shard_count = $var; - - return $this; - } - - /** - * The index of the first character in - * [Document.text][google.cloud.documentai.v1.Document.text] in the overall - * document global text. - * - * Generated from protobuf field int64 text_offset = 3; - * @return int|string - */ - public function getTextOffset() - { - return $this->text_offset; - } - - /** - * The index of the first character in - * [Document.text][google.cloud.documentai.v1.Document.text] in the overall - * document global text. - * - * Generated from protobuf field int64 text_offset = 3; - * @param int|string $var - * @return $this - */ - public function setTextOffset($var) - { - GPBUtil::checkInt64($var); - $this->text_offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Style.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Style.php deleted file mode 100644 index 031f90761f05..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Style.php +++ /dev/null @@ -1,374 +0,0 @@ -google.cloud.documentai.v1.Document.Style - */ -class Style extends \Google\Protobuf\Internal\Message -{ - /** - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; - */ - protected $text_anchor = null; - /** - * Text color. - * - * Generated from protobuf field .google.type.Color color = 2; - */ - protected $color = null; - /** - * Text background color. - * - * Generated from protobuf field .google.type.Color background_color = 3; - */ - protected $background_color = null; - /** - * [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). - * Possible values are `normal`, `bold`, `bolder`, and `lighter`. - * - * Generated from protobuf field string font_weight = 4; - */ - protected $font_weight = ''; - /** - * [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). - * Possible values are `normal`, `italic`, and `oblique`. - * - * Generated from protobuf field string text_style = 5; - */ - protected $text_style = ''; - /** - * [Text - * decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). - * Follows CSS standard. - * - * - * Generated from protobuf field string text_decoration = 6; - */ - protected $text_decoration = ''; - /** - * Font size. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Style.FontSize font_size = 7; - */ - protected $font_size = null; - /** - * Font family such as `Arial`, `Times New Roman`. - * https://www.w3schools.com/cssref/pr_font_font-family.asp - * - * Generated from protobuf field string font_family = 8; - */ - protected $font_family = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Document\TextAnchor $text_anchor - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. - * @type \Google\Type\Color $color - * Text color. - * @type \Google\Type\Color $background_color - * Text background color. - * @type string $font_weight - * [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). - * Possible values are `normal`, `bold`, `bolder`, and `lighter`. - * @type string $text_style - * [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). - * Possible values are `normal`, `italic`, and `oblique`. - * @type string $text_decoration - * [Text - * decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). - * Follows CSS standard. - * - * @type \Google\Cloud\DocumentAI\V1\Document\Style\FontSize $font_size - * Font size. - * @type string $font_family - * Font family such as `Arial`, `Times New Roman`. - * https://www.w3schools.com/cssref/pr_font_font-family.asp - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; - * @return \Google\Cloud\DocumentAI\V1\Document\TextAnchor|null - */ - public function getTextAnchor() - { - return $this->text_anchor; - } - - public function hasTextAnchor() - { - return isset($this->text_anchor); - } - - public function clearTextAnchor() - { - unset($this->text_anchor); - } - - /** - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; - * @param \Google\Cloud\DocumentAI\V1\Document\TextAnchor $var - * @return $this - */ - public function setTextAnchor($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\TextAnchor::class); - $this->text_anchor = $var; - - return $this; - } - - /** - * Text color. - * - * Generated from protobuf field .google.type.Color color = 2; - * @return \Google\Type\Color|null - */ - public function getColor() - { - return $this->color; - } - - public function hasColor() - { - return isset($this->color); - } - - public function clearColor() - { - unset($this->color); - } - - /** - * Text color. - * - * Generated from protobuf field .google.type.Color color = 2; - * @param \Google\Type\Color $var - * @return $this - */ - public function setColor($var) - { - GPBUtil::checkMessage($var, \Google\Type\Color::class); - $this->color = $var; - - return $this; - } - - /** - * Text background color. - * - * Generated from protobuf field .google.type.Color background_color = 3; - * @return \Google\Type\Color|null - */ - public function getBackgroundColor() - { - return $this->background_color; - } - - public function hasBackgroundColor() - { - return isset($this->background_color); - } - - public function clearBackgroundColor() - { - unset($this->background_color); - } - - /** - * Text background color. - * - * Generated from protobuf field .google.type.Color background_color = 3; - * @param \Google\Type\Color $var - * @return $this - */ - public function setBackgroundColor($var) - { - GPBUtil::checkMessage($var, \Google\Type\Color::class); - $this->background_color = $var; - - return $this; - } - - /** - * [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). - * Possible values are `normal`, `bold`, `bolder`, and `lighter`. - * - * Generated from protobuf field string font_weight = 4; - * @return string - */ - public function getFontWeight() - { - return $this->font_weight; - } - - /** - * [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). - * Possible values are `normal`, `bold`, `bolder`, and `lighter`. - * - * Generated from protobuf field string font_weight = 4; - * @param string $var - * @return $this - */ - public function setFontWeight($var) - { - GPBUtil::checkString($var, True); - $this->font_weight = $var; - - return $this; - } - - /** - * [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). - * Possible values are `normal`, `italic`, and `oblique`. - * - * Generated from protobuf field string text_style = 5; - * @return string - */ - public function getTextStyle() - { - return $this->text_style; - } - - /** - * [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). - * Possible values are `normal`, `italic`, and `oblique`. - * - * Generated from protobuf field string text_style = 5; - * @param string $var - * @return $this - */ - public function setTextStyle($var) - { - GPBUtil::checkString($var, True); - $this->text_style = $var; - - return $this; - } - - /** - * [Text - * decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). - * Follows CSS standard. - * - * - * Generated from protobuf field string text_decoration = 6; - * @return string - */ - public function getTextDecoration() - { - return $this->text_decoration; - } - - /** - * [Text - * decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). - * Follows CSS standard. - * - * - * Generated from protobuf field string text_decoration = 6; - * @param string $var - * @return $this - */ - public function setTextDecoration($var) - { - GPBUtil::checkString($var, True); - $this->text_decoration = $var; - - return $this; - } - - /** - * Font size. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Style.FontSize font_size = 7; - * @return \Google\Cloud\DocumentAI\V1\Document\Style\FontSize|null - */ - public function getFontSize() - { - return $this->font_size; - } - - public function hasFontSize() - { - return isset($this->font_size); - } - - public function clearFontSize() - { - unset($this->font_size); - } - - /** - * Font size. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.Style.FontSize font_size = 7; - * @param \Google\Cloud\DocumentAI\V1\Document\Style\FontSize $var - * @return $this - */ - public function setFontSize($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\Style\FontSize::class); - $this->font_size = $var; - - return $this; - } - - /** - * Font family such as `Arial`, `Times New Roman`. - * https://www.w3schools.com/cssref/pr_font_font-family.asp - * - * Generated from protobuf field string font_family = 8; - * @return string - */ - public function getFontFamily() - { - return $this->font_family; - } - - /** - * Font family such as `Arial`, `Times New Roman`. - * https://www.w3schools.com/cssref/pr_font_font-family.asp - * - * Generated from protobuf field string font_family = 8; - * @param string $var - * @return $this - */ - public function setFontFamily($var) - { - GPBUtil::checkString($var, True); - $this->font_family = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Style/FontSize.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Style/FontSize.php deleted file mode 100644 index 8fa5998f8092..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/Style/FontSize.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.documentai.v1.Document.Style.FontSize - */ -class FontSize extends \Google\Protobuf\Internal\Message -{ - /** - * Font size for the text. - * - * Generated from protobuf field float size = 1; - */ - protected $size = 0.0; - /** - * Unit for the font size. Follows CSS naming (such as `in`, `px`, and - * `pt`). - * - * Generated from protobuf field string unit = 2; - */ - protected $unit = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $size - * Font size for the text. - * @type string $unit - * Unit for the font size. Follows CSS naming (such as `in`, `px`, and - * `pt`). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Font size for the text. - * - * Generated from protobuf field float size = 1; - * @return float - */ - public function getSize() - { - return $this->size; - } - - /** - * Font size for the text. - * - * Generated from protobuf field float size = 1; - * @param float $var - * @return $this - */ - public function setSize($var) - { - GPBUtil::checkFloat($var); - $this->size = $var; - - return $this; - } - - /** - * Unit for the font size. Follows CSS naming (such as `in`, `px`, and - * `pt`). - * - * Generated from protobuf field string unit = 2; - * @return string - */ - public function getUnit() - { - return $this->unit; - } - - /** - * Unit for the font size. Follows CSS naming (such as `in`, `px`, and - * `pt`). - * - * Generated from protobuf field string unit = 2; - * @param string $var - * @return $this - */ - public function setUnit($var) - { - GPBUtil::checkString($var, True); - $this->unit = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/TextAnchor.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/TextAnchor.php deleted file mode 100644 index 5e5f6d1d20dc..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/TextAnchor.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.documentai.v1.Document.TextAnchor - */ -class TextAnchor extends \Google\Protobuf\Internal\Message -{ - /** - * The text segments from the - * [Document.text][google.cloud.documentai.v1.Document.text]. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1; - */ - private $text_segments; - /** - * Contains the content of the text span so that users do - * not have to look it up in the text_segments. It is always - * populated for formFields. - * - * Generated from protobuf field string content = 2; - */ - protected $content = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Document\TextAnchor\TextSegment[] $text_segments - * The text segments from the - * [Document.text][google.cloud.documentai.v1.Document.text]. - * @type string $content - * Contains the content of the text span so that users do - * not have to look it up in the text_segments. It is always - * populated for formFields. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * The text segments from the - * [Document.text][google.cloud.documentai.v1.Document.text]. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\TextAnchor\TextSegment> - */ - public function getTextSegments() - { - return $this->text_segments; - } - - /** - * The text segments from the - * [Document.text][google.cloud.documentai.v1.Document.text]. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1; - * @param \Google\Cloud\DocumentAI\V1\Document\TextAnchor\TextSegment[] $var - * @return $this - */ - public function setTextSegments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\TextAnchor\TextSegment::class); - $this->text_segments = $arr; - - return $this; - } - - /** - * Contains the content of the text span so that users do - * not have to look it up in the text_segments. It is always - * populated for formFields. - * - * Generated from protobuf field string content = 2; - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * Contains the content of the text span so that users do - * not have to look it up in the text_segments. It is always - * populated for formFields. - * - * Generated from protobuf field string content = 2; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, True); - $this->content = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/TextAnchor/TextSegment.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/TextAnchor/TextSegment.php deleted file mode 100644 index 6f536b701cdb..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/TextAnchor/TextSegment.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.documentai.v1.Document.TextAnchor.TextSegment - */ -class TextSegment extends \Google\Protobuf\Internal\Message -{ - /** - * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] - * start UTF-8 char index in the - * [Document.text][google.cloud.documentai.v1.Document.text]. - * - * Generated from protobuf field int64 start_index = 1; - */ - protected $start_index = 0; - /** - * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] - * half open end UTF-8 char index in the - * [Document.text][google.cloud.documentai.v1.Document.text]. - * - * Generated from protobuf field int64 end_index = 2; - */ - protected $end_index = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $start_index - * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] - * start UTF-8 char index in the - * [Document.text][google.cloud.documentai.v1.Document.text]. - * @type int|string $end_index - * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] - * half open end UTF-8 char index in the - * [Document.text][google.cloud.documentai.v1.Document.text]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] - * start UTF-8 char index in the - * [Document.text][google.cloud.documentai.v1.Document.text]. - * - * Generated from protobuf field int64 start_index = 1; - * @return int|string - */ - public function getStartIndex() - { - return $this->start_index; - } - - /** - * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] - * start UTF-8 char index in the - * [Document.text][google.cloud.documentai.v1.Document.text]. - * - * Generated from protobuf field int64 start_index = 1; - * @param int|string $var - * @return $this - */ - public function setStartIndex($var) - { - GPBUtil::checkInt64($var); - $this->start_index = $var; - - return $this; - } - - /** - * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] - * half open end UTF-8 char index in the - * [Document.text][google.cloud.documentai.v1.Document.text]. - * - * Generated from protobuf field int64 end_index = 2; - * @return int|string - */ - public function getEndIndex() - { - return $this->end_index; - } - - /** - * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] - * half open end UTF-8 char index in the - * [Document.text][google.cloud.documentai.v1.Document.text]. - * - * Generated from protobuf field int64 end_index = 2; - * @param int|string $var - * @return $this - */ - public function setEndIndex($var) - { - GPBUtil::checkInt64($var); - $this->end_index = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/TextChange.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/TextChange.php deleted file mode 100644 index 2a0286eb186c..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Document/TextChange.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.documentai.v1.Document.TextChange - */ -class TextChange extends \Google\Protobuf\Internal\Message -{ - /** - * Provenance of the correction. - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. There can - * only be a single `TextAnchor.text_segments` element. If the start and - * end index of the text segment are the same, the text change is inserted - * before that index. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; - */ - protected $text_anchor = null; - /** - * The text that replaces the text identified in the `text_anchor`. - * - * Generated from protobuf field string changed_text = 2; - */ - protected $changed_text = ''; - /** - * The history of this annotation. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; - * @deprecated - */ - private $provenance; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Document\TextAnchor $text_anchor - * Provenance of the correction. - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. There can - * only be a single `TextAnchor.text_segments` element. If the start and - * end index of the text segment are the same, the text change is inserted - * before that index. - * @type string $changed_text - * The text that replaces the text identified in the `text_anchor`. - * @type \Google\Cloud\DocumentAI\V1\Document\Provenance[] $provenance - * The history of this annotation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Provenance of the correction. - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. There can - * only be a single `TextAnchor.text_segments` element. If the start and - * end index of the text segment are the same, the text change is inserted - * before that index. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; - * @return \Google\Cloud\DocumentAI\V1\Document\TextAnchor|null - */ - public function getTextAnchor() - { - return $this->text_anchor; - } - - public function hasTextAnchor() - { - return isset($this->text_anchor); - } - - public function clearTextAnchor() - { - unset($this->text_anchor); - } - - /** - * Provenance of the correction. - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. There can - * only be a single `TextAnchor.text_segments` element. If the start and - * end index of the text segment are the same, the text change is inserted - * before that index. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; - * @param \Google\Cloud\DocumentAI\V1\Document\TextAnchor $var - * @return $this - */ - public function setTextAnchor($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document\TextAnchor::class); - $this->text_anchor = $var; - - return $this; - } - - /** - * The text that replaces the text identified in the `text_anchor`. - * - * Generated from protobuf field string changed_text = 2; - * @return string - */ - public function getChangedText() - { - return $this->changed_text; - } - - /** - * The text that replaces the text identified in the `text_anchor`. - * - * Generated from protobuf field string changed_text = 2; - * @param string $var - * @return $this - */ - public function setChangedText($var) - { - GPBUtil::checkString($var, True); - $this->changed_text = $var; - - return $this; - } - - /** - * The history of this annotation. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\Provenance> - * @deprecated - */ - public function getProvenance() - { - if ($this->provenance->count() !== 0) { - @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); - } - return $this->provenance; - } - - /** - * The history of this annotation. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; - * @param \Google\Cloud\DocumentAI\V1\Document\Provenance[] $var - * @return $this - * @deprecated - */ - public function setProvenance($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\Provenance::class); - if ($arr->count() !== 0) { - @trigger_error('provenance is deprecated.', E_USER_DEPRECATED); - } - $this->provenance = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentOutputConfig.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentOutputConfig.php deleted file mode 100644 index 9ae599503371..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentOutputConfig.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.documentai.v1.DocumentOutputConfig - */ -class DocumentOutputConfig extends \Google\Protobuf\Internal\Message -{ - protected $destination; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\DocumentOutputConfig\GcsOutputConfig $gcs_output_config - * Output config to write the results to Cloud Storage. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentIo::initOnce(); - parent::__construct($data); - } - - /** - * Output config to write the results to Cloud Storage. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig gcs_output_config = 1; - * @return \Google\Cloud\DocumentAI\V1\DocumentOutputConfig\GcsOutputConfig|null - */ - public function getGcsOutputConfig() - { - return $this->readOneof(1); - } - - public function hasGcsOutputConfig() - { - return $this->hasOneof(1); - } - - /** - * Output config to write the results to Cloud Storage. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig gcs_output_config = 1; - * @param \Google\Cloud\DocumentAI\V1\DocumentOutputConfig\GcsOutputConfig $var - * @return $this - */ - public function setGcsOutputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\DocumentOutputConfig\GcsOutputConfig::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentOutputConfig/GcsOutputConfig.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentOutputConfig/GcsOutputConfig.php deleted file mode 100644 index ff9bac233d44..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentOutputConfig/GcsOutputConfig.php +++ /dev/null @@ -1,163 +0,0 @@ -google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig - */ -class GcsOutputConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The Cloud Storage uri (a directory) of the output. - * - * Generated from protobuf field string gcs_uri = 1; - */ - protected $gcs_uri = ''; - /** - * Specifies which fields to include in the output documents. - * Only supports top level document and pages field so it must be in the - * form of `{document_field_name}` or `pages.{page_field_name}`. - * - * Generated from protobuf field .google.protobuf.FieldMask field_mask = 2; - */ - protected $field_mask = null; - /** - * Specifies the sharding config for the output document. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.ShardingConfig sharding_config = 3; - */ - protected $sharding_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $gcs_uri - * The Cloud Storage uri (a directory) of the output. - * @type \Google\Protobuf\FieldMask $field_mask - * Specifies which fields to include in the output documents. - * Only supports top level document and pages field so it must be in the - * form of `{document_field_name}` or `pages.{page_field_name}`. - * @type \Google\Cloud\DocumentAI\V1\DocumentOutputConfig\GcsOutputConfig\ShardingConfig $sharding_config - * Specifies the sharding config for the output document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentIo::initOnce(); - parent::__construct($data); - } - - /** - * The Cloud Storage uri (a directory) of the output. - * - * Generated from protobuf field string gcs_uri = 1; - * @return string - */ - public function getGcsUri() - { - return $this->gcs_uri; - } - - /** - * The Cloud Storage uri (a directory) of the output. - * - * Generated from protobuf field string gcs_uri = 1; - * @param string $var - * @return $this - */ - public function setGcsUri($var) - { - GPBUtil::checkString($var, True); - $this->gcs_uri = $var; - - return $this; - } - - /** - * Specifies which fields to include in the output documents. - * Only supports top level document and pages field so it must be in the - * form of `{document_field_name}` or `pages.{page_field_name}`. - * - * Generated from protobuf field .google.protobuf.FieldMask field_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getFieldMask() - { - return $this->field_mask; - } - - public function hasFieldMask() - { - return isset($this->field_mask); - } - - public function clearFieldMask() - { - unset($this->field_mask); - } - - /** - * Specifies which fields to include in the output documents. - * Only supports top level document and pages field so it must be in the - * form of `{document_field_name}` or `pages.{page_field_name}`. - * - * Generated from protobuf field .google.protobuf.FieldMask field_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setFieldMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->field_mask = $var; - - return $this; - } - - /** - * Specifies the sharding config for the output document. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.ShardingConfig sharding_config = 3; - * @return \Google\Cloud\DocumentAI\V1\DocumentOutputConfig\GcsOutputConfig\ShardingConfig|null - */ - public function getShardingConfig() - { - return $this->sharding_config; - } - - public function hasShardingConfig() - { - return isset($this->sharding_config); - } - - public function clearShardingConfig() - { - unset($this->sharding_config); - } - - /** - * Specifies the sharding config for the output document. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.ShardingConfig sharding_config = 3; - * @param \Google\Cloud\DocumentAI\V1\DocumentOutputConfig\GcsOutputConfig\ShardingConfig $var - * @return $this - */ - public function setShardingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\DocumentOutputConfig\GcsOutputConfig\ShardingConfig::class); - $this->sharding_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentOutputConfig/GcsOutputConfig/ShardingConfig.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentOutputConfig/GcsOutputConfig/ShardingConfig.php deleted file mode 100644 index 68e93a8e0c36..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentOutputConfig/GcsOutputConfig/ShardingConfig.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.ShardingConfig - */ -class ShardingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The number of pages per shard. - * - * Generated from protobuf field int32 pages_per_shard = 1; - */ - protected $pages_per_shard = 0; - /** - * The number of overlapping pages between consecutive shards. - * - * Generated from protobuf field int32 pages_overlap = 2; - */ - protected $pages_overlap = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $pages_per_shard - * The number of pages per shard. - * @type int $pages_overlap - * The number of overlapping pages between consecutive shards. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentIo::initOnce(); - parent::__construct($data); - } - - /** - * The number of pages per shard. - * - * Generated from protobuf field int32 pages_per_shard = 1; - * @return int - */ - public function getPagesPerShard() - { - return $this->pages_per_shard; - } - - /** - * The number of pages per shard. - * - * Generated from protobuf field int32 pages_per_shard = 1; - * @param int $var - * @return $this - */ - public function setPagesPerShard($var) - { - GPBUtil::checkInt32($var); - $this->pages_per_shard = $var; - - return $this; - } - - /** - * The number of overlapping pages between consecutive shards. - * - * Generated from protobuf field int32 pages_overlap = 2; - * @return int - */ - public function getPagesOverlap() - { - return $this->pages_overlap; - } - - /** - * The number of overlapping pages between consecutive shards. - * - * Generated from protobuf field int32 pages_overlap = 2; - * @param int $var - * @return $this - */ - public function setPagesOverlap($var) - { - GPBUtil::checkInt32($var); - $this->pages_overlap = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema.php deleted file mode 100644 index 53969cd163f5..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.documentai.v1.DocumentSchema - */ -class DocumentSchema extends \Google\Protobuf\Internal\Message -{ - /** - * Display name to show to users. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * Description of the schema. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * Entity types of the schema. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.DocumentSchema.EntityType entity_types = 3; - */ - private $entity_types; - /** - * Metadata of the schema. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema.Metadata metadata = 4; - */ - protected $metadata = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Display name to show to users. - * @type string $description - * Description of the schema. - * @type \Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType[] $entity_types - * Entity types of the schema. - * @type \Google\Cloud\DocumentAI\V1\DocumentSchema\Metadata $metadata - * Metadata of the schema. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentSchema::initOnce(); - parent::__construct($data); - } - - /** - * Display name to show to users. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Display name to show to users. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Description of the schema. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Description of the schema. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Entity types of the schema. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.DocumentSchema.EntityType entity_types = 3; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType> - */ - public function getEntityTypes() - { - return $this->entity_types; - } - - /** - * Entity types of the schema. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.DocumentSchema.EntityType entity_types = 3; - * @param \Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType[] $var - * @return $this - */ - public function setEntityTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType::class); - $this->entity_types = $arr; - - return $this; - } - - /** - * Metadata of the schema. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema.Metadata metadata = 4; - * @return \Google\Cloud\DocumentAI\V1\DocumentSchema\Metadata|null - */ - public function getMetadata() - { - return $this->metadata; - } - - public function hasMetadata() - { - return isset($this->metadata); - } - - public function clearMetadata() - { - unset($this->metadata); - } - - /** - * Metadata of the schema. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema.Metadata metadata = 4; - * @param \Google\Cloud\DocumentAI\V1\DocumentSchema\Metadata $var - * @return $this - */ - public function setMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\DocumentSchema\Metadata::class); - $this->metadata = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType.php deleted file mode 100644 index c81c989ab9be..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType.php +++ /dev/null @@ -1,273 +0,0 @@ -google.cloud.documentai.v1.DocumentSchema.EntityType - */ -class EntityType extends \Google\Protobuf\Internal\Message -{ - /** - * User defined name for the type. - * - * Generated from protobuf field string display_name = 13; - */ - protected $display_name = ''; - /** - * Name of the type. It must be unique within the schema file and - * cannot be a "Common Type". The following naming conventions are used: - * - Use `snake_casing`. - * - Name matching is case-sensitive. - * - Maximum 64 characters. - * - Must start with a letter. - * - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward - * compatibility internal infrastructure and tooling can handle any ascii - * character.) - * - The `/` is sometimes used to denote a property of a type. For example - * `line_item/amount`. This convention is deprecated, but will still be - * honored for backward compatibility. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The entity type that this type is derived from. For now, one and only - * one should be set. - * - * Generated from protobuf field repeated string base_types = 2; - */ - private $base_types; - /** - * Description the nested structure, or composition of an entity. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.DocumentSchema.EntityType.Property properties = 6; - */ - private $properties; - protected $value_source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType\EnumValues $enum_values - * If specified, lists all the possible values for this entity. This - * should not be more than a handful of values. If the number of values - * is >10 or could change frequently use the `EntityType.value_ontology` - * field and specify a list of all possible values in a value ontology - * file. - * @type string $display_name - * User defined name for the type. - * @type string $name - * Name of the type. It must be unique within the schema file and - * cannot be a "Common Type". The following naming conventions are used: - * - Use `snake_casing`. - * - Name matching is case-sensitive. - * - Maximum 64 characters. - * - Must start with a letter. - * - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward - * compatibility internal infrastructure and tooling can handle any ascii - * character.) - * - The `/` is sometimes used to denote a property of a type. For example - * `line_item/amount`. This convention is deprecated, but will still be - * honored for backward compatibility. - * @type string[] $base_types - * The entity type that this type is derived from. For now, one and only - * one should be set. - * @type \Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType\Property[] $properties - * Description the nested structure, or composition of an entity. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentSchema::initOnce(); - parent::__construct($data); - } - - /** - * If specified, lists all the possible values for this entity. This - * should not be more than a handful of values. If the number of values - * is >10 or could change frequently use the `EntityType.value_ontology` - * field and specify a list of all possible values in a value ontology - * file. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues enum_values = 14; - * @return \Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType\EnumValues|null - */ - public function getEnumValues() - { - return $this->readOneof(14); - } - - public function hasEnumValues() - { - return $this->hasOneof(14); - } - - /** - * If specified, lists all the possible values for this entity. This - * should not be more than a handful of values. If the number of values - * is >10 or could change frequently use the `EntityType.value_ontology` - * field and specify a list of all possible values in a value ontology - * file. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues enum_values = 14; - * @param \Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType\EnumValues $var - * @return $this - */ - public function setEnumValues($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType\EnumValues::class); - $this->writeOneof(14, $var); - - return $this; - } - - /** - * User defined name for the type. - * - * Generated from protobuf field string display_name = 13; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * User defined name for the type. - * - * Generated from protobuf field string display_name = 13; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Name of the type. It must be unique within the schema file and - * cannot be a "Common Type". The following naming conventions are used: - * - Use `snake_casing`. - * - Name matching is case-sensitive. - * - Maximum 64 characters. - * - Must start with a letter. - * - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward - * compatibility internal infrastructure and tooling can handle any ascii - * character.) - * - The `/` is sometimes used to denote a property of a type. For example - * `line_item/amount`. This convention is deprecated, but will still be - * honored for backward compatibility. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the type. It must be unique within the schema file and - * cannot be a "Common Type". The following naming conventions are used: - * - Use `snake_casing`. - * - Name matching is case-sensitive. - * - Maximum 64 characters. - * - Must start with a letter. - * - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward - * compatibility internal infrastructure and tooling can handle any ascii - * character.) - * - The `/` is sometimes used to denote a property of a type. For example - * `line_item/amount`. This convention is deprecated, but will still be - * honored for backward compatibility. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The entity type that this type is derived from. For now, one and only - * one should be set. - * - * Generated from protobuf field repeated string base_types = 2; - * @return RepeatedField - */ - public function getBaseTypes() - { - return $this->base_types; - } - - /** - * The entity type that this type is derived from. For now, one and only - * one should be set. - * - * Generated from protobuf field repeated string base_types = 2; - * @param string[] $var - * @return $this - */ - public function setBaseTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->base_types = $arr; - - return $this; - } - - /** - * Description the nested structure, or composition of an entity. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.DocumentSchema.EntityType.Property properties = 6; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType\Property> - */ - public function getProperties() - { - return $this->properties; - } - - /** - * Description the nested structure, or composition of an entity. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.DocumentSchema.EntityType.Property properties = 6; - * @param \Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType\Property[] $var - * @return $this - */ - public function setProperties($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType\Property::class); - $this->properties = $arr; - - return $this; - } - - /** - * @return string - */ - public function getValueSource() - { - return $this->whichOneof("value_source"); - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/EnumValues.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/EnumValues.php deleted file mode 100644 index 619a9cdde827..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/EnumValues.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues - */ -class EnumValues extends \Google\Protobuf\Internal\Message -{ - /** - * The individual values that this enum values type can include. - * - * Generated from protobuf field repeated string values = 1; - */ - private $values; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string[] $values - * The individual values that this enum values type can include. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentSchema::initOnce(); - parent::__construct($data); - } - - /** - * The individual values that this enum values type can include. - * - * Generated from protobuf field repeated string values = 1; - * @return RepeatedField - */ - public function getValues() - { - return $this->values; - } - - /** - * The individual values that this enum values type can include. - * - * Generated from protobuf field repeated string values = 1; - * @param string[] $var - * @return $this - */ - public function setValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->values = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/Property.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/Property.php deleted file mode 100644 index 0ecbb4dc591a..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/Property.php +++ /dev/null @@ -1,215 +0,0 @@ -google.cloud.documentai.v1.DocumentSchema.EntityType.Property - */ -class Property extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the property. Follows the same guidelines as the - * EntityType name. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * User defined name for the property. - * - * Generated from protobuf field string display_name = 6; - */ - protected $display_name = ''; - /** - * A reference to the value type of the property. This type is subject - * to the same conventions as the `Entity.base_types` field. - * - * Generated from protobuf field string value_type = 2; - */ - protected $value_type = ''; - /** - * Occurrence type limits the number of instances an entity type appears - * in the document. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType occurrence_type = 3; - */ - protected $occurrence_type = 0; - /** - * Specifies how the entity's value is obtained. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema.EntityType.Property.Method method = 8; - */ - protected $method = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the property. Follows the same guidelines as the - * EntityType name. - * @type string $display_name - * User defined name for the property. - * @type string $value_type - * A reference to the value type of the property. This type is subject - * to the same conventions as the `Entity.base_types` field. - * @type int $occurrence_type - * Occurrence type limits the number of instances an entity type appears - * in the document. - * @type int $method - * Specifies how the entity's value is obtained. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentSchema::initOnce(); - parent::__construct($data); - } - - /** - * The name of the property. Follows the same guidelines as the - * EntityType name. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the property. Follows the same guidelines as the - * EntityType name. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * User defined name for the property. - * - * Generated from protobuf field string display_name = 6; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * User defined name for the property. - * - * Generated from protobuf field string display_name = 6; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * A reference to the value type of the property. This type is subject - * to the same conventions as the `Entity.base_types` field. - * - * Generated from protobuf field string value_type = 2; - * @return string - */ - public function getValueType() - { - return $this->value_type; - } - - /** - * A reference to the value type of the property. This type is subject - * to the same conventions as the `Entity.base_types` field. - * - * Generated from protobuf field string value_type = 2; - * @param string $var - * @return $this - */ - public function setValueType($var) - { - GPBUtil::checkString($var, True); - $this->value_type = $var; - - return $this; - } - - /** - * Occurrence type limits the number of instances an entity type appears - * in the document. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType occurrence_type = 3; - * @return int - */ - public function getOccurrenceType() - { - return $this->occurrence_type; - } - - /** - * Occurrence type limits the number of instances an entity type appears - * in the document. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType occurrence_type = 3; - * @param int $var - * @return $this - */ - public function setOccurrenceType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType\Property\OccurrenceType::class); - $this->occurrence_type = $var; - - return $this; - } - - /** - * Specifies how the entity's value is obtained. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema.EntityType.Property.Method method = 8; - * @return int - */ - public function getMethod() - { - return $this->method; - } - - /** - * Specifies how the entity's value is obtained. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema.EntityType.Property.Method method = 8; - * @param int $var - * @return $this - */ - public function setMethod($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType\Property\Method::class); - $this->method = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/Property/Method.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/Property/Method.php deleted file mode 100644 index 9bcf56e4126d..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/Property/Method.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.documentai.v1.DocumentSchema.EntityType.Property.Method - */ -class Method -{ - /** - * Unspecified method. It defaults to `EXTRACT`. - * - * Generated from protobuf enum METHOD_UNSPECIFIED = 0; - */ - const METHOD_UNSPECIFIED = 0; - /** - * The entity's value is directly extracted as-is from the document - * text. - * - * Generated from protobuf enum EXTRACT = 1; - */ - const EXTRACT = 1; - /** - * The entity's value is derived through inference and is not - * necessarily an exact text extraction from the document. - * - * Generated from protobuf enum DERIVE = 2; - */ - const DERIVE = 2; - - private static $valueToName = [ - self::METHOD_UNSPECIFIED => 'METHOD_UNSPECIFIED', - self::EXTRACT => 'EXTRACT', - self::DERIVE => 'DERIVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/Property/OccurrenceType.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/Property/OccurrenceType.php deleted file mode 100644 index 309e464b43ca..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/EntityType/Property/OccurrenceType.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType - */ -class OccurrenceType -{ - /** - * Unspecified occurrence type. - * - * Generated from protobuf enum OCCURRENCE_TYPE_UNSPECIFIED = 0; - */ - const OCCURRENCE_TYPE_UNSPECIFIED = 0; - /** - * There will be zero or one instance of this entity type. The same - * entity instance may be mentioned multiple times. - * - * Generated from protobuf enum OPTIONAL_ONCE = 1; - */ - const OPTIONAL_ONCE = 1; - /** - * The entity type will appear zero or multiple times. - * - * Generated from protobuf enum OPTIONAL_MULTIPLE = 2; - */ - const OPTIONAL_MULTIPLE = 2; - /** - * The entity type will only appear exactly once. The same - * entity instance may be mentioned multiple times. - * - * Generated from protobuf enum REQUIRED_ONCE = 3; - */ - const REQUIRED_ONCE = 3; - /** - * The entity type will appear once or more times. - * - * Generated from protobuf enum REQUIRED_MULTIPLE = 4; - */ - const REQUIRED_MULTIPLE = 4; - - private static $valueToName = [ - self::OCCURRENCE_TYPE_UNSPECIFIED => 'OCCURRENCE_TYPE_UNSPECIFIED', - self::OPTIONAL_ONCE => 'OPTIONAL_ONCE', - self::OPTIONAL_MULTIPLE => 'OPTIONAL_MULTIPLE', - self::REQUIRED_ONCE => 'REQUIRED_ONCE', - self::REQUIRED_MULTIPLE => 'REQUIRED_MULTIPLE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/Metadata.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/Metadata.php deleted file mode 100644 index 15ac6915cb12..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/DocumentSchema/Metadata.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.documentai.v1.DocumentSchema.Metadata - */ -class Metadata extends \Google\Protobuf\Internal\Message -{ - /** - * If true, a `document` entity type can be applied to subdocument - * (splitting). Otherwise, it can only be applied to the entire document - * (classification). - * - * Generated from protobuf field bool document_splitter = 1; - */ - protected $document_splitter = false; - /** - * If true, on a given page, there can be multiple `document` annotations - * covering it. - * - * Generated from protobuf field bool document_allow_multiple_labels = 2; - */ - protected $document_allow_multiple_labels = false; - /** - * If set, all the nested entities must be prefixed with the parents. - * - * Generated from protobuf field bool prefixed_naming_on_properties = 6; - */ - protected $prefixed_naming_on_properties = false; - /** - * If set, we will skip the naming format validation in the schema. So the - * string values in `DocumentSchema.EntityType.name` and - * `DocumentSchema.EntityType.Property.name` will not be checked. - * - * Generated from protobuf field bool skip_naming_validation = 7; - */ - protected $skip_naming_validation = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $document_splitter - * If true, a `document` entity type can be applied to subdocument - * (splitting). Otherwise, it can only be applied to the entire document - * (classification). - * @type bool $document_allow_multiple_labels - * If true, on a given page, there can be multiple `document` annotations - * covering it. - * @type bool $prefixed_naming_on_properties - * If set, all the nested entities must be prefixed with the parents. - * @type bool $skip_naming_validation - * If set, we will skip the naming format validation in the schema. So the - * string values in `DocumentSchema.EntityType.name` and - * `DocumentSchema.EntityType.Property.name` will not be checked. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentSchema::initOnce(); - parent::__construct($data); - } - - /** - * If true, a `document` entity type can be applied to subdocument - * (splitting). Otherwise, it can only be applied to the entire document - * (classification). - * - * Generated from protobuf field bool document_splitter = 1; - * @return bool - */ - public function getDocumentSplitter() - { - return $this->document_splitter; - } - - /** - * If true, a `document` entity type can be applied to subdocument - * (splitting). Otherwise, it can only be applied to the entire document - * (classification). - * - * Generated from protobuf field bool document_splitter = 1; - * @param bool $var - * @return $this - */ - public function setDocumentSplitter($var) - { - GPBUtil::checkBool($var); - $this->document_splitter = $var; - - return $this; - } - - /** - * If true, on a given page, there can be multiple `document` annotations - * covering it. - * - * Generated from protobuf field bool document_allow_multiple_labels = 2; - * @return bool - */ - public function getDocumentAllowMultipleLabels() - { - return $this->document_allow_multiple_labels; - } - - /** - * If true, on a given page, there can be multiple `document` annotations - * covering it. - * - * Generated from protobuf field bool document_allow_multiple_labels = 2; - * @param bool $var - * @return $this - */ - public function setDocumentAllowMultipleLabels($var) - { - GPBUtil::checkBool($var); - $this->document_allow_multiple_labels = $var; - - return $this; - } - - /** - * If set, all the nested entities must be prefixed with the parents. - * - * Generated from protobuf field bool prefixed_naming_on_properties = 6; - * @return bool - */ - public function getPrefixedNamingOnProperties() - { - return $this->prefixed_naming_on_properties; - } - - /** - * If set, all the nested entities must be prefixed with the parents. - * - * Generated from protobuf field bool prefixed_naming_on_properties = 6; - * @param bool $var - * @return $this - */ - public function setPrefixedNamingOnProperties($var) - { - GPBUtil::checkBool($var); - $this->prefixed_naming_on_properties = $var; - - return $this; - } - - /** - * If set, we will skip the naming format validation in the schema. So the - * string values in `DocumentSchema.EntityType.name` and - * `DocumentSchema.EntityType.Property.name` will not be checked. - * - * Generated from protobuf field bool skip_naming_validation = 7; - * @return bool - */ - public function getSkipNamingValidation() - { - return $this->skip_naming_validation; - } - - /** - * If set, we will skip the naming format validation in the schema. So the - * string values in `DocumentSchema.EntityType.name` and - * `DocumentSchema.EntityType.Property.name` will not be checked. - * - * Generated from protobuf field bool skip_naming_validation = 7; - * @param bool $var - * @return $this - */ - public function setSkipNamingValidation($var) - { - GPBUtil::checkBool($var); - $this->skip_naming_validation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EnableProcessorMetadata.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EnableProcessorMetadata.php deleted file mode 100644 index 2dcc788db95e..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EnableProcessorMetadata.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.documentai.v1.EnableProcessorMetadata - */ -class EnableProcessorMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The basic metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 5; - */ - protected $common_metadata = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $common_metadata - * The basic metadata of the long-running operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * The basic metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 5; - * @return \Google\Cloud\DocumentAI\V1\CommonOperationMetadata|null - */ - public function getCommonMetadata() - { - return $this->common_metadata; - } - - public function hasCommonMetadata() - { - return isset($this->common_metadata); - } - - public function clearCommonMetadata() - { - unset($this->common_metadata); - } - - /** - * The basic metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 5; - * @param \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $var - * @return $this - */ - public function setCommonMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\CommonOperationMetadata::class); - $this->common_metadata = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EnableProcessorRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EnableProcessorRequest.php deleted file mode 100644 index 20b1a5c46cfc..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EnableProcessorRequest.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.documentai.v1.EnableProcessorRequest - */ -class EnableProcessorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The processor resource name to be enabled. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The processor resource name to be enabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The processor resource name to be enabled. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The processor resource name to be enabled. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EnableProcessorResponse.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EnableProcessorResponse.php deleted file mode 100644 index 715cfb6a99c8..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EnableProcessorResponse.php +++ /dev/null @@ -1,35 +0,0 @@ -google.cloud.documentai.v1.EnableProcessorResponse - */ -class EnableProcessorResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluateProcessorVersionMetadata.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluateProcessorVersionMetadata.php deleted file mode 100644 index c25a265c42b8..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluateProcessorVersionMetadata.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.documentai.v1.EvaluateProcessorVersionMetadata - */ -class EvaluateProcessorVersionMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The basic metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; - */ - protected $common_metadata = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $common_metadata - * The basic metadata of the long-running operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * The basic metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; - * @return \Google\Cloud\DocumentAI\V1\CommonOperationMetadata|null - */ - public function getCommonMetadata() - { - return $this->common_metadata; - } - - public function hasCommonMetadata() - { - return isset($this->common_metadata); - } - - public function clearCommonMetadata() - { - unset($this->common_metadata); - } - - /** - * The basic metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; - * @param \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $var - * @return $this - */ - public function setCommonMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\CommonOperationMetadata::class); - $this->common_metadata = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluateProcessorVersionRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluateProcessorVersionRequest.php deleted file mode 100644 index bff4cf7bb5ea..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluateProcessorVersionRequest.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.documentai.v1.EvaluateProcessorVersionRequest - */ -class EvaluateProcessorVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to - * evaluate. - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` - * - * Generated from protobuf field string processor_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $processor_version = ''; - /** - * Optional. The documents used in the evaluation. If unspecified, use the - * processor's dataset as evaluation input. - * - * Generated from protobuf field .google.cloud.documentai.v1.BatchDocumentsInputConfig evaluation_documents = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $evaluation_documents = null; - - /** - * @param string $processorVersion Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to - * evaluate. - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` - * Please see {@see DocumentProcessorServiceClient::processorVersionName()} for help formatting this field. - * - * @return \Google\Cloud\DocumentAI\V1\EvaluateProcessorVersionRequest - * - * @experimental - */ - public static function build(string $processorVersion): self - { - return (new self()) - ->setProcessorVersion($processorVersion); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $processor_version - * Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to - * evaluate. - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` - * @type \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig $evaluation_documents - * Optional. The documents used in the evaluation. If unspecified, use the - * processor's dataset as evaluation input. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to - * evaluate. - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` - * - * Generated from protobuf field string processor_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getProcessorVersion() - { - return $this->processor_version; - } - - /** - * Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to - * evaluate. - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` - * - * Generated from protobuf field string processor_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setProcessorVersion($var) - { - GPBUtil::checkString($var, True); - $this->processor_version = $var; - - return $this; - } - - /** - * Optional. The documents used in the evaluation. If unspecified, use the - * processor's dataset as evaluation input. - * - * Generated from protobuf field .google.cloud.documentai.v1.BatchDocumentsInputConfig evaluation_documents = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig|null - */ - public function getEvaluationDocuments() - { - return $this->evaluation_documents; - } - - public function hasEvaluationDocuments() - { - return isset($this->evaluation_documents); - } - - public function clearEvaluationDocuments() - { - unset($this->evaluation_documents); - } - - /** - * Optional. The documents used in the evaluation. If unspecified, use the - * processor's dataset as evaluation input. - * - * Generated from protobuf field .google.cloud.documentai.v1.BatchDocumentsInputConfig evaluation_documents = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig $var - * @return $this - */ - public function setEvaluationDocuments($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig::class); - $this->evaluation_documents = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluateProcessorVersionResponse.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluateProcessorVersionResponse.php deleted file mode 100644 index fe95e455a867..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluateProcessorVersionResponse.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.documentai.v1.EvaluateProcessorVersionResponse - */ -class EvaluateProcessorVersionResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the created evaluation. - * - * Generated from protobuf field string evaluation = 2; - */ - protected $evaluation = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $evaluation - * The resource name of the created evaluation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the created evaluation. - * - * Generated from protobuf field string evaluation = 2; - * @return string - */ - public function getEvaluation() - { - return $this->evaluation; - } - - /** - * The resource name of the created evaluation. - * - * Generated from protobuf field string evaluation = 2; - * @param string $var - * @return $this - */ - public function setEvaluation($var) - { - GPBUtil::checkString($var, True); - $this->evaluation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation.php deleted file mode 100644 index 7c1780081451..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation.php +++ /dev/null @@ -1,309 +0,0 @@ -google.cloud.documentai.v1.Evaluation - */ -class Evaluation extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the evaluation. - * Format: - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The time that the evaluation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; - */ - protected $create_time = null; - /** - * Counters for the documents used in the evaluation. - * - * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.Counters document_counters = 5; - */ - protected $document_counters = null; - /** - * Metrics for all the entities in aggregate. - * - * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics all_entities_metrics = 3; - */ - protected $all_entities_metrics = null; - /** - * Metrics across confidence levels, for different entities. - * - * Generated from protobuf field map entity_metrics = 4; - */ - private $entity_metrics; - /** - * The KMS key name used for encryption. - * - * Generated from protobuf field string kms_key_name = 6; - */ - protected $kms_key_name = ''; - /** - * The KMS key version with which data is encrypted. - * - * Generated from protobuf field string kms_key_version_name = 7; - */ - protected $kms_key_version_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the evaluation. - * Format: - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}` - * @type \Google\Protobuf\Timestamp $create_time - * The time that the evaluation was created. - * @type \Google\Cloud\DocumentAI\V1\Evaluation\Counters $document_counters - * Counters for the documents used in the evaluation. - * @type \Google\Cloud\DocumentAI\V1\Evaluation\MultiConfidenceMetrics $all_entities_metrics - * Metrics for all the entities in aggregate. - * @type array|\Google\Protobuf\Internal\MapField $entity_metrics - * Metrics across confidence levels, for different entities. - * @type string $kms_key_name - * The KMS key name used for encryption. - * @type string $kms_key_version_name - * The KMS key version with which data is encrypted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Evaluation::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the evaluation. - * Format: - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the evaluation. - * Format: - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}` - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The time that the evaluation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * The time that the evaluation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Counters for the documents used in the evaluation. - * - * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.Counters document_counters = 5; - * @return \Google\Cloud\DocumentAI\V1\Evaluation\Counters|null - */ - public function getDocumentCounters() - { - return $this->document_counters; - } - - public function hasDocumentCounters() - { - return isset($this->document_counters); - } - - public function clearDocumentCounters() - { - unset($this->document_counters); - } - - /** - * Counters for the documents used in the evaluation. - * - * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.Counters document_counters = 5; - * @param \Google\Cloud\DocumentAI\V1\Evaluation\Counters $var - * @return $this - */ - public function setDocumentCounters($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Evaluation\Counters::class); - $this->document_counters = $var; - - return $this; - } - - /** - * Metrics for all the entities in aggregate. - * - * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics all_entities_metrics = 3; - * @return \Google\Cloud\DocumentAI\V1\Evaluation\MultiConfidenceMetrics|null - */ - public function getAllEntitiesMetrics() - { - return $this->all_entities_metrics; - } - - public function hasAllEntitiesMetrics() - { - return isset($this->all_entities_metrics); - } - - public function clearAllEntitiesMetrics() - { - unset($this->all_entities_metrics); - } - - /** - * Metrics for all the entities in aggregate. - * - * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics all_entities_metrics = 3; - * @param \Google\Cloud\DocumentAI\V1\Evaluation\MultiConfidenceMetrics $var - * @return $this - */ - public function setAllEntitiesMetrics($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Evaluation\MultiConfidenceMetrics::class); - $this->all_entities_metrics = $var; - - return $this; - } - - /** - * Metrics across confidence levels, for different entities. - * - * Generated from protobuf field map entity_metrics = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getEntityMetrics() - { - return $this->entity_metrics; - } - - /** - * Metrics across confidence levels, for different entities. - * - * Generated from protobuf field map entity_metrics = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setEntityMetrics($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Evaluation\MultiConfidenceMetrics::class); - $this->entity_metrics = $arr; - - return $this; - } - - /** - * The KMS key name used for encryption. - * - * Generated from protobuf field string kms_key_name = 6; - * @return string - */ - public function getKmsKeyName() - { - return $this->kms_key_name; - } - - /** - * The KMS key name used for encryption. - * - * Generated from protobuf field string kms_key_name = 6; - * @param string $var - * @return $this - */ - public function setKmsKeyName($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_name = $var; - - return $this; - } - - /** - * The KMS key version with which data is encrypted. - * - * Generated from protobuf field string kms_key_version_name = 7; - * @return string - */ - public function getKmsKeyVersionName() - { - return $this->kms_key_version_name; - } - - /** - * The KMS key version with which data is encrypted. - * - * Generated from protobuf field string kms_key_version_name = 7; - * @param string $var - * @return $this - */ - public function setKmsKeyVersionName($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_version_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/ConfidenceLevelMetrics.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/ConfidenceLevelMetrics.php deleted file mode 100644 index 5094320ac79e..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/ConfidenceLevelMetrics.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics - */ -class ConfidenceLevelMetrics extends \Google\Protobuf\Internal\Message -{ - /** - * The confidence level. - * - * Generated from protobuf field float confidence_level = 1; - */ - protected $confidence_level = 0.0; - /** - * The metrics at the specific confidence level. - * - * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.Metrics metrics = 2; - */ - protected $metrics = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $confidence_level - * The confidence level. - * @type \Google\Cloud\DocumentAI\V1\Evaluation\Metrics $metrics - * The metrics at the specific confidence level. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Evaluation::initOnce(); - parent::__construct($data); - } - - /** - * The confidence level. - * - * Generated from protobuf field float confidence_level = 1; - * @return float - */ - public function getConfidenceLevel() - { - return $this->confidence_level; - } - - /** - * The confidence level. - * - * Generated from protobuf field float confidence_level = 1; - * @param float $var - * @return $this - */ - public function setConfidenceLevel($var) - { - GPBUtil::checkFloat($var); - $this->confidence_level = $var; - - return $this; - } - - /** - * The metrics at the specific confidence level. - * - * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.Metrics metrics = 2; - * @return \Google\Cloud\DocumentAI\V1\Evaluation\Metrics|null - */ - public function getMetrics() - { - return $this->metrics; - } - - public function hasMetrics() - { - return isset($this->metrics); - } - - public function clearMetrics() - { - unset($this->metrics); - } - - /** - * The metrics at the specific confidence level. - * - * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.Metrics metrics = 2; - * @param \Google\Cloud\DocumentAI\V1\Evaluation\Metrics $var - * @return $this - */ - public function setMetrics($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Evaluation\Metrics::class); - $this->metrics = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/Counters.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/Counters.php deleted file mode 100644 index ef1d774664cc..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/Counters.php +++ /dev/null @@ -1,177 +0,0 @@ -google.cloud.documentai.v1.Evaluation.Counters - */ -class Counters extends \Google\Protobuf\Internal\Message -{ - /** - * How many documents were sent for evaluation. - * - * Generated from protobuf field int32 input_documents_count = 1; - */ - protected $input_documents_count = 0; - /** - * How many documents were not included in the evaluation as they didn't - * pass validation. - * - * Generated from protobuf field int32 invalid_documents_count = 2; - */ - protected $invalid_documents_count = 0; - /** - * How many documents were not included in the evaluation as Document AI - * failed to process them. - * - * Generated from protobuf field int32 failed_documents_count = 3; - */ - protected $failed_documents_count = 0; - /** - * How many documents were used in the evaluation. - * - * Generated from protobuf field int32 evaluated_documents_count = 4; - */ - protected $evaluated_documents_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $input_documents_count - * How many documents were sent for evaluation. - * @type int $invalid_documents_count - * How many documents were not included in the evaluation as they didn't - * pass validation. - * @type int $failed_documents_count - * How many documents were not included in the evaluation as Document AI - * failed to process them. - * @type int $evaluated_documents_count - * How many documents were used in the evaluation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Evaluation::initOnce(); - parent::__construct($data); - } - - /** - * How many documents were sent for evaluation. - * - * Generated from protobuf field int32 input_documents_count = 1; - * @return int - */ - public function getInputDocumentsCount() - { - return $this->input_documents_count; - } - - /** - * How many documents were sent for evaluation. - * - * Generated from protobuf field int32 input_documents_count = 1; - * @param int $var - * @return $this - */ - public function setInputDocumentsCount($var) - { - GPBUtil::checkInt32($var); - $this->input_documents_count = $var; - - return $this; - } - - /** - * How many documents were not included in the evaluation as they didn't - * pass validation. - * - * Generated from protobuf field int32 invalid_documents_count = 2; - * @return int - */ - public function getInvalidDocumentsCount() - { - return $this->invalid_documents_count; - } - - /** - * How many documents were not included in the evaluation as they didn't - * pass validation. - * - * Generated from protobuf field int32 invalid_documents_count = 2; - * @param int $var - * @return $this - */ - public function setInvalidDocumentsCount($var) - { - GPBUtil::checkInt32($var); - $this->invalid_documents_count = $var; - - return $this; - } - - /** - * How many documents were not included in the evaluation as Document AI - * failed to process them. - * - * Generated from protobuf field int32 failed_documents_count = 3; - * @return int - */ - public function getFailedDocumentsCount() - { - return $this->failed_documents_count; - } - - /** - * How many documents were not included in the evaluation as Document AI - * failed to process them. - * - * Generated from protobuf field int32 failed_documents_count = 3; - * @param int $var - * @return $this - */ - public function setFailedDocumentsCount($var) - { - GPBUtil::checkInt32($var); - $this->failed_documents_count = $var; - - return $this; - } - - /** - * How many documents were used in the evaluation. - * - * Generated from protobuf field int32 evaluated_documents_count = 4; - * @return int - */ - public function getEvaluatedDocumentsCount() - { - return $this->evaluated_documents_count; - } - - /** - * How many documents were used in the evaluation. - * - * Generated from protobuf field int32 evaluated_documents_count = 4; - * @param int $var - * @return $this - */ - public function setEvaluatedDocumentsCount($var) - { - GPBUtil::checkInt32($var); - $this->evaluated_documents_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/Metrics.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/Metrics.php deleted file mode 100644 index f73063ace65e..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/Metrics.php +++ /dev/null @@ -1,407 +0,0 @@ -google.cloud.documentai.v1.Evaluation.Metrics - */ -class Metrics extends \Google\Protobuf\Internal\Message -{ - /** - * The calculated precision. - * - * Generated from protobuf field float precision = 1; - */ - protected $precision = 0.0; - /** - * The calculated recall. - * - * Generated from protobuf field float recall = 2; - */ - protected $recall = 0.0; - /** - * The calculated f1 score. - * - * Generated from protobuf field float f1_score = 3; - */ - protected $f1_score = 0.0; - /** - * The amount of occurrences in predicted documents. - * - * Generated from protobuf field int32 predicted_occurrences_count = 4; - */ - protected $predicted_occurrences_count = 0; - /** - * The amount of occurrences in ground truth documents. - * - * Generated from protobuf field int32 ground_truth_occurrences_count = 5; - */ - protected $ground_truth_occurrences_count = 0; - /** - * The amount of documents with a predicted occurrence. - * - * Generated from protobuf field int32 predicted_document_count = 10; - */ - protected $predicted_document_count = 0; - /** - * The amount of documents with a ground truth occurrence. - * - * Generated from protobuf field int32 ground_truth_document_count = 11; - */ - protected $ground_truth_document_count = 0; - /** - * The amount of true positives. - * - * Generated from protobuf field int32 true_positives_count = 6; - */ - protected $true_positives_count = 0; - /** - * The amount of false positives. - * - * Generated from protobuf field int32 false_positives_count = 7; - */ - protected $false_positives_count = 0; - /** - * The amount of false negatives. - * - * Generated from protobuf field int32 false_negatives_count = 8; - */ - protected $false_negatives_count = 0; - /** - * The amount of documents that had an occurrence of this label. - * - * Generated from protobuf field int32 total_documents_count = 9; - */ - protected $total_documents_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $precision - * The calculated precision. - * @type float $recall - * The calculated recall. - * @type float $f1_score - * The calculated f1 score. - * @type int $predicted_occurrences_count - * The amount of occurrences in predicted documents. - * @type int $ground_truth_occurrences_count - * The amount of occurrences in ground truth documents. - * @type int $predicted_document_count - * The amount of documents with a predicted occurrence. - * @type int $ground_truth_document_count - * The amount of documents with a ground truth occurrence. - * @type int $true_positives_count - * The amount of true positives. - * @type int $false_positives_count - * The amount of false positives. - * @type int $false_negatives_count - * The amount of false negatives. - * @type int $total_documents_count - * The amount of documents that had an occurrence of this label. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Evaluation::initOnce(); - parent::__construct($data); - } - - /** - * The calculated precision. - * - * Generated from protobuf field float precision = 1; - * @return float - */ - public function getPrecision() - { - return $this->precision; - } - - /** - * The calculated precision. - * - * Generated from protobuf field float precision = 1; - * @param float $var - * @return $this - */ - public function setPrecision($var) - { - GPBUtil::checkFloat($var); - $this->precision = $var; - - return $this; - } - - /** - * The calculated recall. - * - * Generated from protobuf field float recall = 2; - * @return float - */ - public function getRecall() - { - return $this->recall; - } - - /** - * The calculated recall. - * - * Generated from protobuf field float recall = 2; - * @param float $var - * @return $this - */ - public function setRecall($var) - { - GPBUtil::checkFloat($var); - $this->recall = $var; - - return $this; - } - - /** - * The calculated f1 score. - * - * Generated from protobuf field float f1_score = 3; - * @return float - */ - public function getF1Score() - { - return $this->f1_score; - } - - /** - * The calculated f1 score. - * - * Generated from protobuf field float f1_score = 3; - * @param float $var - * @return $this - */ - public function setF1Score($var) - { - GPBUtil::checkFloat($var); - $this->f1_score = $var; - - return $this; - } - - /** - * The amount of occurrences in predicted documents. - * - * Generated from protobuf field int32 predicted_occurrences_count = 4; - * @return int - */ - public function getPredictedOccurrencesCount() - { - return $this->predicted_occurrences_count; - } - - /** - * The amount of occurrences in predicted documents. - * - * Generated from protobuf field int32 predicted_occurrences_count = 4; - * @param int $var - * @return $this - */ - public function setPredictedOccurrencesCount($var) - { - GPBUtil::checkInt32($var); - $this->predicted_occurrences_count = $var; - - return $this; - } - - /** - * The amount of occurrences in ground truth documents. - * - * Generated from protobuf field int32 ground_truth_occurrences_count = 5; - * @return int - */ - public function getGroundTruthOccurrencesCount() - { - return $this->ground_truth_occurrences_count; - } - - /** - * The amount of occurrences in ground truth documents. - * - * Generated from protobuf field int32 ground_truth_occurrences_count = 5; - * @param int $var - * @return $this - */ - public function setGroundTruthOccurrencesCount($var) - { - GPBUtil::checkInt32($var); - $this->ground_truth_occurrences_count = $var; - - return $this; - } - - /** - * The amount of documents with a predicted occurrence. - * - * Generated from protobuf field int32 predicted_document_count = 10; - * @return int - */ - public function getPredictedDocumentCount() - { - return $this->predicted_document_count; - } - - /** - * The amount of documents with a predicted occurrence. - * - * Generated from protobuf field int32 predicted_document_count = 10; - * @param int $var - * @return $this - */ - public function setPredictedDocumentCount($var) - { - GPBUtil::checkInt32($var); - $this->predicted_document_count = $var; - - return $this; - } - - /** - * The amount of documents with a ground truth occurrence. - * - * Generated from protobuf field int32 ground_truth_document_count = 11; - * @return int - */ - public function getGroundTruthDocumentCount() - { - return $this->ground_truth_document_count; - } - - /** - * The amount of documents with a ground truth occurrence. - * - * Generated from protobuf field int32 ground_truth_document_count = 11; - * @param int $var - * @return $this - */ - public function setGroundTruthDocumentCount($var) - { - GPBUtil::checkInt32($var); - $this->ground_truth_document_count = $var; - - return $this; - } - - /** - * The amount of true positives. - * - * Generated from protobuf field int32 true_positives_count = 6; - * @return int - */ - public function getTruePositivesCount() - { - return $this->true_positives_count; - } - - /** - * The amount of true positives. - * - * Generated from protobuf field int32 true_positives_count = 6; - * @param int $var - * @return $this - */ - public function setTruePositivesCount($var) - { - GPBUtil::checkInt32($var); - $this->true_positives_count = $var; - - return $this; - } - - /** - * The amount of false positives. - * - * Generated from protobuf field int32 false_positives_count = 7; - * @return int - */ - public function getFalsePositivesCount() - { - return $this->false_positives_count; - } - - /** - * The amount of false positives. - * - * Generated from protobuf field int32 false_positives_count = 7; - * @param int $var - * @return $this - */ - public function setFalsePositivesCount($var) - { - GPBUtil::checkInt32($var); - $this->false_positives_count = $var; - - return $this; - } - - /** - * The amount of false negatives. - * - * Generated from protobuf field int32 false_negatives_count = 8; - * @return int - */ - public function getFalseNegativesCount() - { - return $this->false_negatives_count; - } - - /** - * The amount of false negatives. - * - * Generated from protobuf field int32 false_negatives_count = 8; - * @param int $var - * @return $this - */ - public function setFalseNegativesCount($var) - { - GPBUtil::checkInt32($var); - $this->false_negatives_count = $var; - - return $this; - } - - /** - * The amount of documents that had an occurrence of this label. - * - * Generated from protobuf field int32 total_documents_count = 9; - * @return int - */ - public function getTotalDocumentsCount() - { - return $this->total_documents_count; - } - - /** - * The amount of documents that had an occurrence of this label. - * - * Generated from protobuf field int32 total_documents_count = 9; - * @param int $var - * @return $this - */ - public function setTotalDocumentsCount($var) - { - GPBUtil::checkInt32($var); - $this->total_documents_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/MultiConfidenceMetrics.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/MultiConfidenceMetrics.php deleted file mode 100644 index 0b9d765c0bdc..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/MultiConfidenceMetrics.php +++ /dev/null @@ -1,287 +0,0 @@ -google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics - */ -class MultiConfidenceMetrics extends \Google\Protobuf\Internal\Message -{ - /** - * Metrics across confidence levels with fuzzy matching enabled. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; - */ - private $confidence_level_metrics; - /** - * Metrics across confidence levels with only exact matching. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; - */ - private $confidence_level_metrics_exact; - /** - * The calculated area under the precision recall curve (AUPRC), computed by - * integrating over all confidence thresholds. - * - * Generated from protobuf field float auprc = 2; - */ - protected $auprc = 0.0; - /** - * The Estimated Calibration Error (ECE) of the confidence of the predicted - * entities. - * - * Generated from protobuf field float estimated_calibration_error = 3; - */ - protected $estimated_calibration_error = 0.0; - /** - * The AUPRC for metrics with fuzzy matching disabled, i.e., exact matching - * only. - * - * Generated from protobuf field float auprc_exact = 5; - */ - protected $auprc_exact = 0.0; - /** - * The ECE for the predicted entities with fuzzy matching disabled, i.e., - * exact matching only. - * - * Generated from protobuf field float estimated_calibration_error_exact = 6; - */ - protected $estimated_calibration_error_exact = 0.0; - /** - * The metrics type for the label. - * - * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.MetricsType metrics_type = 7; - */ - protected $metrics_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Evaluation\ConfidenceLevelMetrics[] $confidence_level_metrics - * Metrics across confidence levels with fuzzy matching enabled. - * @type \Google\Cloud\DocumentAI\V1\Evaluation\ConfidenceLevelMetrics[] $confidence_level_metrics_exact - * Metrics across confidence levels with only exact matching. - * @type float $auprc - * The calculated area under the precision recall curve (AUPRC), computed by - * integrating over all confidence thresholds. - * @type float $estimated_calibration_error - * The Estimated Calibration Error (ECE) of the confidence of the predicted - * entities. - * @type float $auprc_exact - * The AUPRC for metrics with fuzzy matching disabled, i.e., exact matching - * only. - * @type float $estimated_calibration_error_exact - * The ECE for the predicted entities with fuzzy matching disabled, i.e., - * exact matching only. - * @type int $metrics_type - * The metrics type for the label. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Evaluation::initOnce(); - parent::__construct($data); - } - - /** - * Metrics across confidence levels with fuzzy matching enabled. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Evaluation\ConfidenceLevelMetrics> - */ - public function getConfidenceLevelMetrics() - { - return $this->confidence_level_metrics; - } - - /** - * Metrics across confidence levels with fuzzy matching enabled. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; - * @param \Google\Cloud\DocumentAI\V1\Evaluation\ConfidenceLevelMetrics[] $var - * @return $this - */ - public function setConfidenceLevelMetrics($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Evaluation\ConfidenceLevelMetrics::class); - $this->confidence_level_metrics = $arr; - - return $this; - } - - /** - * Metrics across confidence levels with only exact matching. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Evaluation\ConfidenceLevelMetrics> - */ - public function getConfidenceLevelMetricsExact() - { - return $this->confidence_level_metrics_exact; - } - - /** - * Metrics across confidence levels with only exact matching. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; - * @param \Google\Cloud\DocumentAI\V1\Evaluation\ConfidenceLevelMetrics[] $var - * @return $this - */ - public function setConfidenceLevelMetricsExact($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Evaluation\ConfidenceLevelMetrics::class); - $this->confidence_level_metrics_exact = $arr; - - return $this; - } - - /** - * The calculated area under the precision recall curve (AUPRC), computed by - * integrating over all confidence thresholds. - * - * Generated from protobuf field float auprc = 2; - * @return float - */ - public function getAuprc() - { - return $this->auprc; - } - - /** - * The calculated area under the precision recall curve (AUPRC), computed by - * integrating over all confidence thresholds. - * - * Generated from protobuf field float auprc = 2; - * @param float $var - * @return $this - */ - public function setAuprc($var) - { - GPBUtil::checkFloat($var); - $this->auprc = $var; - - return $this; - } - - /** - * The Estimated Calibration Error (ECE) of the confidence of the predicted - * entities. - * - * Generated from protobuf field float estimated_calibration_error = 3; - * @return float - */ - public function getEstimatedCalibrationError() - { - return $this->estimated_calibration_error; - } - - /** - * The Estimated Calibration Error (ECE) of the confidence of the predicted - * entities. - * - * Generated from protobuf field float estimated_calibration_error = 3; - * @param float $var - * @return $this - */ - public function setEstimatedCalibrationError($var) - { - GPBUtil::checkFloat($var); - $this->estimated_calibration_error = $var; - - return $this; - } - - /** - * The AUPRC for metrics with fuzzy matching disabled, i.e., exact matching - * only. - * - * Generated from protobuf field float auprc_exact = 5; - * @return float - */ - public function getAuprcExact() - { - return $this->auprc_exact; - } - - /** - * The AUPRC for metrics with fuzzy matching disabled, i.e., exact matching - * only. - * - * Generated from protobuf field float auprc_exact = 5; - * @param float $var - * @return $this - */ - public function setAuprcExact($var) - { - GPBUtil::checkFloat($var); - $this->auprc_exact = $var; - - return $this; - } - - /** - * The ECE for the predicted entities with fuzzy matching disabled, i.e., - * exact matching only. - * - * Generated from protobuf field float estimated_calibration_error_exact = 6; - * @return float - */ - public function getEstimatedCalibrationErrorExact() - { - return $this->estimated_calibration_error_exact; - } - - /** - * The ECE for the predicted entities with fuzzy matching disabled, i.e., - * exact matching only. - * - * Generated from protobuf field float estimated_calibration_error_exact = 6; - * @param float $var - * @return $this - */ - public function setEstimatedCalibrationErrorExact($var) - { - GPBUtil::checkFloat($var); - $this->estimated_calibration_error_exact = $var; - - return $this; - } - - /** - * The metrics type for the label. - * - * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.MetricsType metrics_type = 7; - * @return int - */ - public function getMetricsType() - { - return $this->metrics_type; - } - - /** - * The metrics type for the label. - * - * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.MetricsType metrics_type = 7; - * @param int $var - * @return $this - */ - public function setMetricsType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\Evaluation\MultiConfidenceMetrics\MetricsType::class); - $this->metrics_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/MultiConfidenceMetrics/MetricsType.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/MultiConfidenceMetrics/MetricsType.php deleted file mode 100644 index 6659a5e63484..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Evaluation/MultiConfidenceMetrics/MetricsType.php +++ /dev/null @@ -1,60 +0,0 @@ -google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.MetricsType - */ -class MetricsType -{ - /** - * The metrics type is unspecified. By default, metrics without a - * particular specification are for leaf entity types (i.e., top-level - * entity types without child types, or child types which are not - * parent types themselves). - * - * Generated from protobuf enum METRICS_TYPE_UNSPECIFIED = 0; - */ - const METRICS_TYPE_UNSPECIFIED = 0; - /** - * Indicates whether metrics for this particular label type represent an - * aggregate of metrics for other types instead of being based on actual - * TP/FP/FN values for the label type. Metrics for parent (i.e., non-leaf) - * entity types are an aggregate of metrics for their children. - * - * Generated from protobuf enum AGGREGATE = 1; - */ - const AGGREGATE = 1; - - private static $valueToName = [ - self::METRICS_TYPE_UNSPECIFIED => 'METRICS_TYPE_UNSPECIFIED', - self::AGGREGATE => 'AGGREGATE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluationReference.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluationReference.php deleted file mode 100644 index 3bc0cdaf5c6d..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/EvaluationReference.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.documentai.v1.EvaluationReference - */ -class EvaluationReference extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the Long Running Operation for the evaluation. - * - * Generated from protobuf field string operation = 1; - */ - protected $operation = ''; - /** - * The resource name of the evaluation. - * - * Generated from protobuf field string evaluation = 2 [(.google.api.resource_reference) = { - */ - protected $evaluation = ''; - /** - * An aggregate of the statistics for the evaluation with fuzzy matching on. - * - * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.Metrics aggregate_metrics = 4; - */ - protected $aggregate_metrics = null; - /** - * An aggregate of the statistics for the evaluation with fuzzy matching off. - * - * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.Metrics aggregate_metrics_exact = 5; - */ - protected $aggregate_metrics_exact = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $operation - * The resource name of the Long Running Operation for the evaluation. - * @type string $evaluation - * The resource name of the evaluation. - * @type \Google\Cloud\DocumentAI\V1\Evaluation\Metrics $aggregate_metrics - * An aggregate of the statistics for the evaluation with fuzzy matching on. - * @type \Google\Cloud\DocumentAI\V1\Evaluation\Metrics $aggregate_metrics_exact - * An aggregate of the statistics for the evaluation with fuzzy matching off. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Evaluation::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the Long Running Operation for the evaluation. - * - * Generated from protobuf field string operation = 1; - * @return string - */ - public function getOperation() - { - return $this->operation; - } - - /** - * The resource name of the Long Running Operation for the evaluation. - * - * Generated from protobuf field string operation = 1; - * @param string $var - * @return $this - */ - public function setOperation($var) - { - GPBUtil::checkString($var, True); - $this->operation = $var; - - return $this; - } - - /** - * The resource name of the evaluation. - * - * Generated from protobuf field string evaluation = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getEvaluation() - { - return $this->evaluation; - } - - /** - * The resource name of the evaluation. - * - * Generated from protobuf field string evaluation = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setEvaluation($var) - { - GPBUtil::checkString($var, True); - $this->evaluation = $var; - - return $this; - } - - /** - * An aggregate of the statistics for the evaluation with fuzzy matching on. - * - * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.Metrics aggregate_metrics = 4; - * @return \Google\Cloud\DocumentAI\V1\Evaluation\Metrics|null - */ - public function getAggregateMetrics() - { - return $this->aggregate_metrics; - } - - public function hasAggregateMetrics() - { - return isset($this->aggregate_metrics); - } - - public function clearAggregateMetrics() - { - unset($this->aggregate_metrics); - } - - /** - * An aggregate of the statistics for the evaluation with fuzzy matching on. - * - * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.Metrics aggregate_metrics = 4; - * @param \Google\Cloud\DocumentAI\V1\Evaluation\Metrics $var - * @return $this - */ - public function setAggregateMetrics($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Evaluation\Metrics::class); - $this->aggregate_metrics = $var; - - return $this; - } - - /** - * An aggregate of the statistics for the evaluation with fuzzy matching off. - * - * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.Metrics aggregate_metrics_exact = 5; - * @return \Google\Cloud\DocumentAI\V1\Evaluation\Metrics|null - */ - public function getAggregateMetricsExact() - { - return $this->aggregate_metrics_exact; - } - - public function hasAggregateMetricsExact() - { - return isset($this->aggregate_metrics_exact); - } - - public function clearAggregateMetricsExact() - { - unset($this->aggregate_metrics_exact); - } - - /** - * An aggregate of the statistics for the evaluation with fuzzy matching off. - * - * Generated from protobuf field .google.cloud.documentai.v1.Evaluation.Metrics aggregate_metrics_exact = 5; - * @param \Google\Cloud\DocumentAI\V1\Evaluation\Metrics $var - * @return $this - */ - public function setAggregateMetricsExact($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Evaluation\Metrics::class); - $this->aggregate_metrics_exact = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/FetchProcessorTypesRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/FetchProcessorTypesRequest.php deleted file mode 100644 index a68624fa273e..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/FetchProcessorTypesRequest.php +++ /dev/null @@ -1,89 +0,0 @@ -google.cloud.documentai.v1.FetchProcessorTypesRequest - */ -class FetchProcessorTypesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location of processor types to list. - * Format: `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - - /** - * @param string $parent Required. The location of processor types to list. - * Format: `projects/{project}/locations/{location}`. Please see - * {@see DocumentProcessorServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\DocumentAI\V1\FetchProcessorTypesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The location of processor types to list. - * Format: `projects/{project}/locations/{location}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location of processor types to list. - * Format: `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The location of processor types to list. - * Format: `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/FetchProcessorTypesResponse.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/FetchProcessorTypesResponse.php deleted file mode 100644 index d4c03c7f883a..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/FetchProcessorTypesResponse.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.documentai.v1.FetchProcessorTypesResponse - */ -class FetchProcessorTypesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of processor types. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.ProcessorType processor_types = 1; - */ - private $processor_types; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\ProcessorType[] $processor_types - * The list of processor types. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * The list of processor types. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.ProcessorType processor_types = 1; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\ProcessorType> - */ - public function getProcessorTypes() - { - return $this->processor_types; - } - - /** - * The list of processor types. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.ProcessorType processor_types = 1; - * @param \Google\Cloud\DocumentAI\V1\ProcessorType[] $var - * @return $this - */ - public function setProcessorTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\ProcessorType::class); - $this->processor_types = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GcsDocument.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GcsDocument.php deleted file mode 100644 index 51c9d985c9cb..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GcsDocument.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.documentai.v1.GcsDocument - */ -class GcsDocument extends \Google\Protobuf\Internal\Message -{ - /** - * The Cloud Storage object uri. - * - * Generated from protobuf field string gcs_uri = 1; - */ - protected $gcs_uri = ''; - /** - * An IANA MIME type (RFC6838) of the content. - * - * Generated from protobuf field string mime_type = 2; - */ - protected $mime_type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $gcs_uri - * The Cloud Storage object uri. - * @type string $mime_type - * An IANA MIME type (RFC6838) of the content. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentIo::initOnce(); - parent::__construct($data); - } - - /** - * The Cloud Storage object uri. - * - * Generated from protobuf field string gcs_uri = 1; - * @return string - */ - public function getGcsUri() - { - return $this->gcs_uri; - } - - /** - * The Cloud Storage object uri. - * - * Generated from protobuf field string gcs_uri = 1; - * @param string $var - * @return $this - */ - public function setGcsUri($var) - { - GPBUtil::checkString($var, True); - $this->gcs_uri = $var; - - return $this; - } - - /** - * An IANA MIME type (RFC6838) of the content. - * - * Generated from protobuf field string mime_type = 2; - * @return string - */ - public function getMimeType() - { - return $this->mime_type; - } - - /** - * An IANA MIME type (RFC6838) of the content. - * - * Generated from protobuf field string mime_type = 2; - * @param string $var - * @return $this - */ - public function setMimeType($var) - { - GPBUtil::checkString($var, True); - $this->mime_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GcsDocuments.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GcsDocuments.php deleted file mode 100644 index 48a7face7e67..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GcsDocuments.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.documentai.v1.GcsDocuments - */ -class GcsDocuments extends \Google\Protobuf\Internal\Message -{ - /** - * The list of documents. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.GcsDocument documents = 1; - */ - private $documents; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\GcsDocument[] $documents - * The list of documents. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentIo::initOnce(); - parent::__construct($data); - } - - /** - * The list of documents. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.GcsDocument documents = 1; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\GcsDocument> - */ - public function getDocuments() - { - return $this->documents; - } - - /** - * The list of documents. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.GcsDocument documents = 1; - * @param \Google\Cloud\DocumentAI\V1\GcsDocument[] $var - * @return $this - */ - public function setDocuments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\GcsDocument::class); - $this->documents = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GcsPrefix.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GcsPrefix.php deleted file mode 100644 index 601991e8741f..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GcsPrefix.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.documentai.v1.GcsPrefix - */ -class GcsPrefix extends \Google\Protobuf\Internal\Message -{ - /** - * The URI prefix. - * - * Generated from protobuf field string gcs_uri_prefix = 1; - */ - protected $gcs_uri_prefix = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $gcs_uri_prefix - * The URI prefix. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentIo::initOnce(); - parent::__construct($data); - } - - /** - * The URI prefix. - * - * Generated from protobuf field string gcs_uri_prefix = 1; - * @return string - */ - public function getGcsUriPrefix() - { - return $this->gcs_uri_prefix; - } - - /** - * The URI prefix. - * - * Generated from protobuf field string gcs_uri_prefix = 1; - * @param string $var - * @return $this - */ - public function setGcsUriPrefix($var) - { - GPBUtil::checkString($var, True); - $this->gcs_uri_prefix = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetEvaluationRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetEvaluationRequest.php deleted file mode 100644 index c7a36b059c78..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetEvaluationRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.documentai.v1.GetEvaluationRequest - */ -class GetEvaluationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the - * [Evaluation][google.cloud.documentai.v1.Evaluation] to get. - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the - * [Evaluation][google.cloud.documentai.v1.Evaluation] to get. - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` - * Please see {@see DocumentProcessorServiceClient::evaluationName()} for help formatting this field. - * - * @return \Google\Cloud\DocumentAI\V1\GetEvaluationRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the - * [Evaluation][google.cloud.documentai.v1.Evaluation] to get. - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the - * [Evaluation][google.cloud.documentai.v1.Evaluation] to get. - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the - * [Evaluation][google.cloud.documentai.v1.Evaluation] to get. - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetProcessorRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetProcessorRequest.php deleted file mode 100644 index 23399c1f2f27..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetProcessorRequest.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.documentai.v1.GetProcessorRequest - */ -class GetProcessorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The processor resource name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The processor resource name. Please see - * {@see DocumentProcessorServiceClient::processorName()} for help formatting this field. - * - * @return \Google\Cloud\DocumentAI\V1\GetProcessorRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The processor resource name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The processor resource name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The processor resource name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetProcessorTypeRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetProcessorTypeRequest.php deleted file mode 100644 index ba99d81c0996..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetProcessorTypeRequest.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.documentai.v1.GetProcessorTypeRequest - */ -class GetProcessorTypeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The processor type resource name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The processor type resource name. Please see - * {@see DocumentProcessorServiceClient::processorTypeName()} for help formatting this field. - * - * @return \Google\Cloud\DocumentAI\V1\GetProcessorTypeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The processor type resource name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The processor type resource name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The processor type resource name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetProcessorVersionRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetProcessorVersionRequest.php deleted file mode 100644 index 675477af819e..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/GetProcessorVersionRequest.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.documentai.v1.GetProcessorVersionRequest - */ -class GetProcessorVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The processor resource name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The processor resource name. Please see - * {@see DocumentProcessorServiceClient::processorVersionName()} for help formatting this field. - * - * @return \Google\Cloud\DocumentAI\V1\GetProcessorVersionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The processor resource name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The processor resource name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The processor resource name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/HumanReviewStatus.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/HumanReviewStatus.php deleted file mode 100644 index f2aece70f16d..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/HumanReviewStatus.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.documentai.v1.HumanReviewStatus - */ -class HumanReviewStatus extends \Google\Protobuf\Internal\Message -{ - /** - * The state of human review on the processing request. - * - * Generated from protobuf field .google.cloud.documentai.v1.HumanReviewStatus.State state = 1; - */ - protected $state = 0; - /** - * A message providing more details about the human review state. - * - * Generated from protobuf field string state_message = 2; - */ - protected $state_message = ''; - /** - * The name of the operation triggered by the processed document. This field - * is populated only when the - * [state][google.cloud.documentai.v1.HumanReviewStatus.state] is - * `HUMAN_REVIEW_IN_PROGRESS`. It has the same response type and metadata as - * the long-running operation returned by - * [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument]. - * - * Generated from protobuf field string human_review_operation = 3; - */ - protected $human_review_operation = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * The state of human review on the processing request. - * @type string $state_message - * A message providing more details about the human review state. - * @type string $human_review_operation - * The name of the operation triggered by the processed document. This field - * is populated only when the - * [state][google.cloud.documentai.v1.HumanReviewStatus.state] is - * `HUMAN_REVIEW_IN_PROGRESS`. It has the same response type and metadata as - * the long-running operation returned by - * [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * The state of human review on the processing request. - * - * Generated from protobuf field .google.cloud.documentai.v1.HumanReviewStatus.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of human review on the processing request. - * - * Generated from protobuf field .google.cloud.documentai.v1.HumanReviewStatus.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\HumanReviewStatus\State::class); - $this->state = $var; - - return $this; - } - - /** - * A message providing more details about the human review state. - * - * Generated from protobuf field string state_message = 2; - * @return string - */ - public function getStateMessage() - { - return $this->state_message; - } - - /** - * A message providing more details about the human review state. - * - * Generated from protobuf field string state_message = 2; - * @param string $var - * @return $this - */ - public function setStateMessage($var) - { - GPBUtil::checkString($var, True); - $this->state_message = $var; - - return $this; - } - - /** - * The name of the operation triggered by the processed document. This field - * is populated only when the - * [state][google.cloud.documentai.v1.HumanReviewStatus.state] is - * `HUMAN_REVIEW_IN_PROGRESS`. It has the same response type and metadata as - * the long-running operation returned by - * [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument]. - * - * Generated from protobuf field string human_review_operation = 3; - * @return string - */ - public function getHumanReviewOperation() - { - return $this->human_review_operation; - } - - /** - * The name of the operation triggered by the processed document. This field - * is populated only when the - * [state][google.cloud.documentai.v1.HumanReviewStatus.state] is - * `HUMAN_REVIEW_IN_PROGRESS`. It has the same response type and metadata as - * the long-running operation returned by - * [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument]. - * - * Generated from protobuf field string human_review_operation = 3; - * @param string $var - * @return $this - */ - public function setHumanReviewOperation($var) - { - GPBUtil::checkString($var, True); - $this->human_review_operation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/HumanReviewStatus/State.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/HumanReviewStatus/State.php deleted file mode 100644 index 3283c2f4b942..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/HumanReviewStatus/State.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.documentai.v1.HumanReviewStatus.State - */ -class State -{ - /** - * Human review state is unspecified. Most likely due to an internal error. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Human review is skipped for the document. This can happen because human - * review isn't enabled on the processor or the processing request has - * been set to skip this document. - * - * Generated from protobuf enum SKIPPED = 1; - */ - const SKIPPED = 1; - /** - * Human review validation is triggered and passed, so no review is needed. - * - * Generated from protobuf enum VALIDATION_PASSED = 2; - */ - const VALIDATION_PASSED = 2; - /** - * Human review validation is triggered and the document is under review. - * - * Generated from protobuf enum IN_PROGRESS = 3; - */ - const IN_PROGRESS = 3; - /** - * Some error happened during triggering human review, see the - * [state_message][google.cloud.documentai.v1.HumanReviewStatus.state_message] - * for details. - * - * Generated from protobuf enum ERROR = 4; - */ - const ERROR = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::SKIPPED => 'SKIPPED', - self::VALIDATION_PASSED => 'VALIDATION_PASSED', - self::IN_PROGRESS => 'IN_PROGRESS', - self::ERROR => 'ERROR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListEvaluationsRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListEvaluationsRequest.php deleted file mode 100644 index 085fc8d59a99..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListEvaluationsRequest.php +++ /dev/null @@ -1,177 +0,0 @@ -google.cloud.documentai.v1.ListEvaluationsRequest - */ -class ListEvaluationsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list - * evaluations for. - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The standard list page size. - * If unspecified, at most `5` evaluations are returned. - * The maximum value is `100`. Values above `100` are coerced to `100`. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListEvaluations` call. - * Provide this to retrieve the subsequent page. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list - * evaluations for. - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` - * Please see {@see DocumentProcessorServiceClient::processorVersionName()} for help formatting this field. - * - * @return \Google\Cloud\DocumentAI\V1\ListEvaluationsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list - * evaluations for. - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` - * @type int $page_size - * The standard list page size. - * If unspecified, at most `5` evaluations are returned. - * The maximum value is `100`. Values above `100` are coerced to `100`. - * @type string $page_token - * A page token, received from a previous `ListEvaluations` call. - * Provide this to retrieve the subsequent page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list - * evaluations for. - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list - * evaluations for. - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The standard list page size. - * If unspecified, at most `5` evaluations are returned. - * The maximum value is `100`. Values above `100` are coerced to `100`. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The standard list page size. - * If unspecified, at most `5` evaluations are returned. - * The maximum value is `100`. Values above `100` are coerced to `100`. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous `ListEvaluations` call. - * Provide this to retrieve the subsequent page. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListEvaluations` call. - * Provide this to retrieve the subsequent page. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListEvaluationsResponse.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListEvaluationsResponse.php deleted file mode 100644 index 793f277d20aa..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListEvaluationsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.documentai.v1.ListEvaluationsResponse - */ -class ListEvaluationsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The evaluations requested. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Evaluation evaluations = 1; - */ - private $evaluations; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Evaluation[] $evaluations - * The evaluations requested. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * The evaluations requested. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Evaluation evaluations = 1; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Evaluation> - */ - public function getEvaluations() - { - return $this->evaluations; - } - - /** - * The evaluations requested. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Evaluation evaluations = 1; - * @param \Google\Cloud\DocumentAI\V1\Evaluation[] $var - * @return $this - */ - public function setEvaluations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Evaluation::class); - $this->evaluations = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorTypesRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorTypesRequest.php deleted file mode 100644 index 85769fb81a83..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorTypesRequest.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.documentai.v1.ListProcessorTypesRequest - */ -class ListProcessorTypesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location of processor types to list. - * Format: `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of processor types to return. - * If unspecified, at most `100` processor types will be returned. - * The maximum value is `500`. Values above `500` will be coerced to `500`. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * Used to retrieve the next page of results, empty if at the end of the list. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The location of processor types to list. - * Format: `projects/{project}/locations/{location}`. Please see - * {@see DocumentProcessorServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\DocumentAI\V1\ListProcessorTypesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The location of processor types to list. - * Format: `projects/{project}/locations/{location}`. - * @type int $page_size - * The maximum number of processor types to return. - * If unspecified, at most `100` processor types will be returned. - * The maximum value is `500`. Values above `500` will be coerced to `500`. - * @type string $page_token - * Used to retrieve the next page of results, empty if at the end of the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location of processor types to list. - * Format: `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The location of processor types to list. - * Format: `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of processor types to return. - * If unspecified, at most `100` processor types will be returned. - * The maximum value is `500`. Values above `500` will be coerced to `500`. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of processor types to return. - * If unspecified, at most `100` processor types will be returned. - * The maximum value is `500`. Values above `500` will be coerced to `500`. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Used to retrieve the next page of results, empty if at the end of the list. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Used to retrieve the next page of results, empty if at the end of the list. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorTypesResponse.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorTypesResponse.php deleted file mode 100644 index dd14156a4cab..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorTypesResponse.php +++ /dev/null @@ -1,103 +0,0 @@ -google.cloud.documentai.v1.ListProcessorTypesResponse - */ -class ListProcessorTypesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The processor types. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.ProcessorType processor_types = 1; - */ - private $processor_types; - /** - * Points to the next page, otherwise empty. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\ProcessorType[] $processor_types - * The processor types. - * @type string $next_page_token - * Points to the next page, otherwise empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * The processor types. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.ProcessorType processor_types = 1; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\ProcessorType> - */ - public function getProcessorTypes() - { - return $this->processor_types; - } - - /** - * The processor types. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.ProcessorType processor_types = 1; - * @param \Google\Cloud\DocumentAI\V1\ProcessorType[] $var - * @return $this - */ - public function setProcessorTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\ProcessorType::class); - $this->processor_types = $arr; - - return $this; - } - - /** - * Points to the next page, otherwise empty. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Points to the next page, otherwise empty. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorVersionsRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorVersionsRequest.php deleted file mode 100644 index 8fdec0920123..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorVersionsRequest.php +++ /dev/null @@ -1,171 +0,0 @@ -google.cloud.documentai.v1.ListProcessorVersionsRequest - */ -class ListProcessorVersionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent (project, location and processor) to list all - * versions. Format: - * `projects/{project}/locations/{location}/processors/{processor}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of processor versions to return. - * If unspecified, at most `10` processor versions will be returned. - * The maximum value is `20`. Values above `20` will be coerced to `20`. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * We will return the processor versions sorted by creation time. The page - * token will point to the next processor version. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent (project, location and processor) to list all - * versions. Format: - * `projects/{project}/locations/{location}/processors/{processor}` - * Please see {@see DocumentProcessorServiceClient::processorName()} for help formatting this field. - * - * @return \Google\Cloud\DocumentAI\V1\ListProcessorVersionsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent (project, location and processor) to list all - * versions. Format: - * `projects/{project}/locations/{location}/processors/{processor}` - * @type int $page_size - * The maximum number of processor versions to return. - * If unspecified, at most `10` processor versions will be returned. - * The maximum value is `20`. Values above `20` will be coerced to `20`. - * @type string $page_token - * We will return the processor versions sorted by creation time. The page - * token will point to the next processor version. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent (project, location and processor) to list all - * versions. Format: - * `projects/{project}/locations/{location}/processors/{processor}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent (project, location and processor) to list all - * versions. Format: - * `projects/{project}/locations/{location}/processors/{processor}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of processor versions to return. - * If unspecified, at most `10` processor versions will be returned. - * The maximum value is `20`. Values above `20` will be coerced to `20`. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of processor versions to return. - * If unspecified, at most `10` processor versions will be returned. - * The maximum value is `20`. Values above `20` will be coerced to `20`. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * We will return the processor versions sorted by creation time. The page - * token will point to the next processor version. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * We will return the processor versions sorted by creation time. The page - * token will point to the next processor version. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorVersionsResponse.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorVersionsResponse.php deleted file mode 100644 index 9b40f74443cb..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorVersionsResponse.php +++ /dev/null @@ -1,103 +0,0 @@ -google.cloud.documentai.v1.ListProcessorVersionsResponse - */ -class ListProcessorVersionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of processors. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.ProcessorVersion processor_versions = 1; - */ - private $processor_versions; - /** - * Points to the next processor, otherwise empty. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\ProcessorVersion[] $processor_versions - * The list of processors. - * @type string $next_page_token - * Points to the next processor, otherwise empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * The list of processors. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.ProcessorVersion processor_versions = 1; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\ProcessorVersion> - */ - public function getProcessorVersions() - { - return $this->processor_versions; - } - - /** - * The list of processors. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.ProcessorVersion processor_versions = 1; - * @param \Google\Cloud\DocumentAI\V1\ProcessorVersion[] $var - * @return $this - */ - public function setProcessorVersions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\ProcessorVersion::class); - $this->processor_versions = $arr; - - return $this; - } - - /** - * Points to the next processor, otherwise empty. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Points to the next processor, otherwise empty. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorsRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorsRequest.php deleted file mode 100644 index 0c658b1c9a10..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorsRequest.php +++ /dev/null @@ -1,166 +0,0 @@ -google.cloud.documentai.v1.ListProcessorsRequest - */ -class ListProcessorsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent (project and location) which owns this collection of - * Processors. Format: `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of processors to return. - * If unspecified, at most `50` processors will be returned. - * The maximum value is `100`. Values above `100` will be coerced to `100`. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * We will return the processors sorted by creation time. The page token - * will point to the next processor. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent (project and location) which owns this collection of - * Processors. Format: `projects/{project}/locations/{location}` - * Please see {@see DocumentProcessorServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\DocumentAI\V1\ListProcessorsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent (project and location) which owns this collection of - * Processors. Format: `projects/{project}/locations/{location}` - * @type int $page_size - * The maximum number of processors to return. - * If unspecified, at most `50` processors will be returned. - * The maximum value is `100`. Values above `100` will be coerced to `100`. - * @type string $page_token - * We will return the processors sorted by creation time. The page token - * will point to the next processor. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent (project and location) which owns this collection of - * Processors. Format: `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent (project and location) which owns this collection of - * Processors. Format: `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of processors to return. - * If unspecified, at most `50` processors will be returned. - * The maximum value is `100`. Values above `100` will be coerced to `100`. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of processors to return. - * If unspecified, at most `50` processors will be returned. - * The maximum value is `100`. Values above `100` will be coerced to `100`. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * We will return the processors sorted by creation time. The page token - * will point to the next processor. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * We will return the processors sorted by creation time. The page token - * will point to the next processor. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorsResponse.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorsResponse.php deleted file mode 100644 index 7ae4aca0c019..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ListProcessorsResponse.php +++ /dev/null @@ -1,103 +0,0 @@ -google.cloud.documentai.v1.ListProcessorsResponse - */ -class ListProcessorsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of processors. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Processor processors = 1; - */ - private $processors; - /** - * Points to the next processor, otherwise empty. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Processor[] $processors - * The list of processors. - * @type string $next_page_token - * Points to the next processor, otherwise empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * The list of processors. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Processor processors = 1; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Processor> - */ - public function getProcessors() - { - return $this->processors; - } - - /** - * The list of processors. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.Processor processors = 1; - * @param \Google\Cloud\DocumentAI\V1\Processor[] $var - * @return $this - */ - public function setProcessors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Processor::class); - $this->processors = $arr; - - return $this; - } - - /** - * Points to the next processor, otherwise empty. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Points to the next processor, otherwise empty. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/NormalizedVertex.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/NormalizedVertex.php deleted file mode 100644 index 858c6080256a..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/NormalizedVertex.php +++ /dev/null @@ -1,103 +0,0 @@ -google.cloud.documentai.v1.NormalizedVertex - */ -class NormalizedVertex extends \Google\Protobuf\Internal\Message -{ - /** - * X coordinate. - * - * Generated from protobuf field float x = 1; - */ - protected $x = 0.0; - /** - * Y coordinate (starts from the top of the image). - * - * Generated from protobuf field float y = 2; - */ - protected $y = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $x - * X coordinate. - * @type float $y - * Y coordinate (starts from the top of the image). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Geometry::initOnce(); - parent::__construct($data); - } - - /** - * X coordinate. - * - * Generated from protobuf field float x = 1; - * @return float - */ - public function getX() - { - return $this->x; - } - - /** - * X coordinate. - * - * Generated from protobuf field float x = 1; - * @param float $var - * @return $this - */ - public function setX($var) - { - GPBUtil::checkFloat($var); - $this->x = $var; - - return $this; - } - - /** - * Y coordinate (starts from the top of the image). - * - * Generated from protobuf field float y = 2; - * @return float - */ - public function getY() - { - return $this->y; - } - - /** - * Y coordinate (starts from the top of the image). - * - * Generated from protobuf field float y = 2; - * @param float $var - * @return $this - */ - public function setY($var) - { - GPBUtil::checkFloat($var); - $this->y = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/OcrConfig.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/OcrConfig.php deleted file mode 100644 index 67d0a0d2536f..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/OcrConfig.php +++ /dev/null @@ -1,380 +0,0 @@ -google.cloud.documentai.v1.OcrConfig - */ -class OcrConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Hints for the OCR model. - * - * Generated from protobuf field .google.cloud.documentai.v1.OcrConfig.Hints hints = 2; - */ - protected $hints = null; - /** - * Enables special handling for PDFs with existing text information. Results - * in better text extraction quality in such PDF inputs. - * - * Generated from protobuf field bool enable_native_pdf_parsing = 3; - */ - protected $enable_native_pdf_parsing = false; - /** - * Enables intelligent document quality scores after OCR. Can help with - * diagnosing why OCR responses are of poor quality for a given input. - * Adds additional latency comparable to regular OCR to the process call. - * - * Generated from protobuf field bool enable_image_quality_scores = 4; - */ - protected $enable_image_quality_scores = false; - /** - * A list of advanced OCR options to further fine-tune OCR behavior. Current - * valid values are: - * - `legacy_layout`: a heuristics layout detection algorithm, which serves as - * an alternative to the current ML-based layout detection algorithm. - * Customers can choose the best suitable layout algorithm based on their - * situation. - * - * Generated from protobuf field repeated string advanced_ocr_options = 5; - */ - private $advanced_ocr_options; - /** - * Includes symbol level OCR information if set to true. - * - * Generated from protobuf field bool enable_symbol = 6; - */ - protected $enable_symbol = false; - /** - * Turn on font identification model and return font style information. - * Deprecated, use - * [PremiumFeatures.compute_style_info][google.cloud.documentai.v1.OcrConfig.PremiumFeatures.compute_style_info] - * instead. - * - * Generated from protobuf field bool compute_style_info = 8 [deprecated = true]; - * @deprecated - */ - protected $compute_style_info = false; - /** - * Turn off character box detector in OCR engine. Character box detection is - * enabled by default in OCR 2.0 (and later) processors. - * - * Generated from protobuf field bool disable_character_boxes_detection = 10; - */ - protected $disable_character_boxes_detection = false; - /** - * Configurations for premium OCR features. - * - * Generated from protobuf field .google.cloud.documentai.v1.OcrConfig.PremiumFeatures premium_features = 11; - */ - protected $premium_features = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\OcrConfig\Hints $hints - * Hints for the OCR model. - * @type bool $enable_native_pdf_parsing - * Enables special handling for PDFs with existing text information. Results - * in better text extraction quality in such PDF inputs. - * @type bool $enable_image_quality_scores - * Enables intelligent document quality scores after OCR. Can help with - * diagnosing why OCR responses are of poor quality for a given input. - * Adds additional latency comparable to regular OCR to the process call. - * @type string[] $advanced_ocr_options - * A list of advanced OCR options to further fine-tune OCR behavior. Current - * valid values are: - * - `legacy_layout`: a heuristics layout detection algorithm, which serves as - * an alternative to the current ML-based layout detection algorithm. - * Customers can choose the best suitable layout algorithm based on their - * situation. - * @type bool $enable_symbol - * Includes symbol level OCR information if set to true. - * @type bool $compute_style_info - * Turn on font identification model and return font style information. - * Deprecated, use - * [PremiumFeatures.compute_style_info][google.cloud.documentai.v1.OcrConfig.PremiumFeatures.compute_style_info] - * instead. - * @type bool $disable_character_boxes_detection - * Turn off character box detector in OCR engine. Character box detection is - * enabled by default in OCR 2.0 (and later) processors. - * @type \Google\Cloud\DocumentAI\V1\OcrConfig\PremiumFeatures $premium_features - * Configurations for premium OCR features. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentIo::initOnce(); - parent::__construct($data); - } - - /** - * Hints for the OCR model. - * - * Generated from protobuf field .google.cloud.documentai.v1.OcrConfig.Hints hints = 2; - * @return \Google\Cloud\DocumentAI\V1\OcrConfig\Hints|null - */ - public function getHints() - { - return $this->hints; - } - - public function hasHints() - { - return isset($this->hints); - } - - public function clearHints() - { - unset($this->hints); - } - - /** - * Hints for the OCR model. - * - * Generated from protobuf field .google.cloud.documentai.v1.OcrConfig.Hints hints = 2; - * @param \Google\Cloud\DocumentAI\V1\OcrConfig\Hints $var - * @return $this - */ - public function setHints($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\OcrConfig\Hints::class); - $this->hints = $var; - - return $this; - } - - /** - * Enables special handling for PDFs with existing text information. Results - * in better text extraction quality in such PDF inputs. - * - * Generated from protobuf field bool enable_native_pdf_parsing = 3; - * @return bool - */ - public function getEnableNativePdfParsing() - { - return $this->enable_native_pdf_parsing; - } - - /** - * Enables special handling for PDFs with existing text information. Results - * in better text extraction quality in such PDF inputs. - * - * Generated from protobuf field bool enable_native_pdf_parsing = 3; - * @param bool $var - * @return $this - */ - public function setEnableNativePdfParsing($var) - { - GPBUtil::checkBool($var); - $this->enable_native_pdf_parsing = $var; - - return $this; - } - - /** - * Enables intelligent document quality scores after OCR. Can help with - * diagnosing why OCR responses are of poor quality for a given input. - * Adds additional latency comparable to regular OCR to the process call. - * - * Generated from protobuf field bool enable_image_quality_scores = 4; - * @return bool - */ - public function getEnableImageQualityScores() - { - return $this->enable_image_quality_scores; - } - - /** - * Enables intelligent document quality scores after OCR. Can help with - * diagnosing why OCR responses are of poor quality for a given input. - * Adds additional latency comparable to regular OCR to the process call. - * - * Generated from protobuf field bool enable_image_quality_scores = 4; - * @param bool $var - * @return $this - */ - public function setEnableImageQualityScores($var) - { - GPBUtil::checkBool($var); - $this->enable_image_quality_scores = $var; - - return $this; - } - - /** - * A list of advanced OCR options to further fine-tune OCR behavior. Current - * valid values are: - * - `legacy_layout`: a heuristics layout detection algorithm, which serves as - * an alternative to the current ML-based layout detection algorithm. - * Customers can choose the best suitable layout algorithm based on their - * situation. - * - * Generated from protobuf field repeated string advanced_ocr_options = 5; - * @return RepeatedField - */ - public function getAdvancedOcrOptions() - { - return $this->advanced_ocr_options; - } - - /** - * A list of advanced OCR options to further fine-tune OCR behavior. Current - * valid values are: - * - `legacy_layout`: a heuristics layout detection algorithm, which serves as - * an alternative to the current ML-based layout detection algorithm. - * Customers can choose the best suitable layout algorithm based on their - * situation. - * - * Generated from protobuf field repeated string advanced_ocr_options = 5; - * @param string[] $var - * @return $this - */ - public function setAdvancedOcrOptions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->advanced_ocr_options = $arr; - - return $this; - } - - /** - * Includes symbol level OCR information if set to true. - * - * Generated from protobuf field bool enable_symbol = 6; - * @return bool - */ - public function getEnableSymbol() - { - return $this->enable_symbol; - } - - /** - * Includes symbol level OCR information if set to true. - * - * Generated from protobuf field bool enable_symbol = 6; - * @param bool $var - * @return $this - */ - public function setEnableSymbol($var) - { - GPBUtil::checkBool($var); - $this->enable_symbol = $var; - - return $this; - } - - /** - * Turn on font identification model and return font style information. - * Deprecated, use - * [PremiumFeatures.compute_style_info][google.cloud.documentai.v1.OcrConfig.PremiumFeatures.compute_style_info] - * instead. - * - * Generated from protobuf field bool compute_style_info = 8 [deprecated = true]; - * @return bool - * @deprecated - */ - public function getComputeStyleInfo() - { - if ($this->compute_style_info !== false) { - @trigger_error('compute_style_info is deprecated.', E_USER_DEPRECATED); - } - return $this->compute_style_info; - } - - /** - * Turn on font identification model and return font style information. - * Deprecated, use - * [PremiumFeatures.compute_style_info][google.cloud.documentai.v1.OcrConfig.PremiumFeatures.compute_style_info] - * instead. - * - * Generated from protobuf field bool compute_style_info = 8 [deprecated = true]; - * @param bool $var - * @return $this - * @deprecated - */ - public function setComputeStyleInfo($var) - { - @trigger_error('compute_style_info is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkBool($var); - $this->compute_style_info = $var; - - return $this; - } - - /** - * Turn off character box detector in OCR engine. Character box detection is - * enabled by default in OCR 2.0 (and later) processors. - * - * Generated from protobuf field bool disable_character_boxes_detection = 10; - * @return bool - */ - public function getDisableCharacterBoxesDetection() - { - return $this->disable_character_boxes_detection; - } - - /** - * Turn off character box detector in OCR engine. Character box detection is - * enabled by default in OCR 2.0 (and later) processors. - * - * Generated from protobuf field bool disable_character_boxes_detection = 10; - * @param bool $var - * @return $this - */ - public function setDisableCharacterBoxesDetection($var) - { - GPBUtil::checkBool($var); - $this->disable_character_boxes_detection = $var; - - return $this; - } - - /** - * Configurations for premium OCR features. - * - * Generated from protobuf field .google.cloud.documentai.v1.OcrConfig.PremiumFeatures premium_features = 11; - * @return \Google\Cloud\DocumentAI\V1\OcrConfig\PremiumFeatures|null - */ - public function getPremiumFeatures() - { - return $this->premium_features; - } - - public function hasPremiumFeatures() - { - return isset($this->premium_features); - } - - public function clearPremiumFeatures() - { - unset($this->premium_features); - } - - /** - * Configurations for premium OCR features. - * - * Generated from protobuf field .google.cloud.documentai.v1.OcrConfig.PremiumFeatures premium_features = 11; - * @param \Google\Cloud\DocumentAI\V1\OcrConfig\PremiumFeatures $var - * @return $this - */ - public function setPremiumFeatures($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\OcrConfig\PremiumFeatures::class); - $this->premium_features = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/OcrConfig/Hints.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/OcrConfig/Hints.php deleted file mode 100644 index 919aa6ca9987..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/OcrConfig/Hints.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.documentai.v1.OcrConfig.Hints - */ -class Hints extends \Google\Protobuf\Internal\Message -{ - /** - * List of BCP-47 language codes to use for OCR. In most cases, not - * specifying it yields the best results since it enables automatic language - * detection. For languages based on the Latin alphabet, setting hints is - * not needed. In rare cases, when the language of the text in the - * image is known, setting a hint will help get better results (although it - * will be a significant hindrance if the hint is wrong). - * - * Generated from protobuf field repeated string language_hints = 1; - */ - private $language_hints; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string[] $language_hints - * List of BCP-47 language codes to use for OCR. In most cases, not - * specifying it yields the best results since it enables automatic language - * detection. For languages based on the Latin alphabet, setting hints is - * not needed. In rare cases, when the language of the text in the - * image is known, setting a hint will help get better results (although it - * will be a significant hindrance if the hint is wrong). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentIo::initOnce(); - parent::__construct($data); - } - - /** - * List of BCP-47 language codes to use for OCR. In most cases, not - * specifying it yields the best results since it enables automatic language - * detection. For languages based on the Latin alphabet, setting hints is - * not needed. In rare cases, when the language of the text in the - * image is known, setting a hint will help get better results (although it - * will be a significant hindrance if the hint is wrong). - * - * Generated from protobuf field repeated string language_hints = 1; - * @return RepeatedField - */ - public function getLanguageHints() - { - return $this->language_hints; - } - - /** - * List of BCP-47 language codes to use for OCR. In most cases, not - * specifying it yields the best results since it enables automatic language - * detection. For languages based on the Latin alphabet, setting hints is - * not needed. In rare cases, when the language of the text in the - * image is known, setting a hint will help get better results (although it - * will be a significant hindrance if the hint is wrong). - * - * Generated from protobuf field repeated string language_hints = 1; - * @param string[] $var - * @return $this - */ - public function setLanguageHints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->language_hints = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/OcrConfig/PremiumFeatures.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/OcrConfig/PremiumFeatures.php deleted file mode 100644 index 5e00760eea69..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/OcrConfig/PremiumFeatures.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.documentai.v1.OcrConfig.PremiumFeatures - */ -class PremiumFeatures extends \Google\Protobuf\Internal\Message -{ - /** - * Turn on selection mark detector in OCR engine. Only available in OCR 2.0 - * (and later) processors. - * - * Generated from protobuf field bool enable_selection_mark_detection = 3; - */ - protected $enable_selection_mark_detection = false; - /** - * Turn on font identification model and return font style information. - * - * Generated from protobuf field bool compute_style_info = 4; - */ - protected $compute_style_info = false; - /** - * Turn on the model that can extract LaTeX math formulas. - * - * Generated from protobuf field bool enable_math_ocr = 5; - */ - protected $enable_math_ocr = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enable_selection_mark_detection - * Turn on selection mark detector in OCR engine. Only available in OCR 2.0 - * (and later) processors. - * @type bool $compute_style_info - * Turn on font identification model and return font style information. - * @type bool $enable_math_ocr - * Turn on the model that can extract LaTeX math formulas. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentIo::initOnce(); - parent::__construct($data); - } - - /** - * Turn on selection mark detector in OCR engine. Only available in OCR 2.0 - * (and later) processors. - * - * Generated from protobuf field bool enable_selection_mark_detection = 3; - * @return bool - */ - public function getEnableSelectionMarkDetection() - { - return $this->enable_selection_mark_detection; - } - - /** - * Turn on selection mark detector in OCR engine. Only available in OCR 2.0 - * (and later) processors. - * - * Generated from protobuf field bool enable_selection_mark_detection = 3; - * @param bool $var - * @return $this - */ - public function setEnableSelectionMarkDetection($var) - { - GPBUtil::checkBool($var); - $this->enable_selection_mark_detection = $var; - - return $this; - } - - /** - * Turn on font identification model and return font style information. - * - * Generated from protobuf field bool compute_style_info = 4; - * @return bool - */ - public function getComputeStyleInfo() - { - return $this->compute_style_info; - } - - /** - * Turn on font identification model and return font style information. - * - * Generated from protobuf field bool compute_style_info = 4; - * @param bool $var - * @return $this - */ - public function setComputeStyleInfo($var) - { - GPBUtil::checkBool($var); - $this->compute_style_info = $var; - - return $this; - } - - /** - * Turn on the model that can extract LaTeX math formulas. - * - * Generated from protobuf field bool enable_math_ocr = 5; - * @return bool - */ - public function getEnableMathOcr() - { - return $this->enable_math_ocr; - } - - /** - * Turn on the model that can extract LaTeX math formulas. - * - * Generated from protobuf field bool enable_math_ocr = 5; - * @param bool $var - * @return $this - */ - public function setEnableMathOcr($var) - { - GPBUtil::checkBool($var); - $this->enable_math_ocr = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions.php deleted file mode 100644 index 4a117eef08f7..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions.php +++ /dev/null @@ -1,300 +0,0 @@ -google.cloud.documentai.v1.ProcessOptions - */ -class ProcessOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Only applicable to `OCR_PROCESSOR` and `FORM_PARSER_PROCESSOR`. - * Returns error if set on other processor types. - * - * Generated from protobuf field .google.cloud.documentai.v1.OcrConfig ocr_config = 1; - */ - protected $ocr_config = null; - /** - * Optional. Only applicable to `LAYOUT_PARSER_PROCESSOR`. - * Returns error if set on other processor types. - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessOptions.LayoutConfig layout_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $layout_config = null; - /** - * Optional. Override the schema of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. Will - * return an Invalid Argument error if this field is set when the underlying - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] doesn't - * support schema override. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema schema_override = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $schema_override = null; - protected $page_range; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\ProcessOptions\IndividualPageSelector $individual_page_selector - * Which pages to process (1-indexed). - * @type int $from_start - * Only process certain pages from the start. Process all if the document - * has fewer pages. - * @type int $from_end - * Only process certain pages from the end, same as above. - * @type \Google\Cloud\DocumentAI\V1\OcrConfig $ocr_config - * Only applicable to `OCR_PROCESSOR` and `FORM_PARSER_PROCESSOR`. - * Returns error if set on other processor types. - * @type \Google\Cloud\DocumentAI\V1\ProcessOptions\LayoutConfig $layout_config - * Optional. Only applicable to `LAYOUT_PARSER_PROCESSOR`. - * Returns error if set on other processor types. - * @type \Google\Cloud\DocumentAI\V1\DocumentSchema $schema_override - * Optional. Override the schema of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. Will - * return an Invalid Argument error if this field is set when the underlying - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] doesn't - * support schema override. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * Which pages to process (1-indexed). - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessOptions.IndividualPageSelector individual_page_selector = 5; - * @return \Google\Cloud\DocumentAI\V1\ProcessOptions\IndividualPageSelector|null - */ - public function getIndividualPageSelector() - { - return $this->readOneof(5); - } - - public function hasIndividualPageSelector() - { - return $this->hasOneof(5); - } - - /** - * Which pages to process (1-indexed). - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessOptions.IndividualPageSelector individual_page_selector = 5; - * @param \Google\Cloud\DocumentAI\V1\ProcessOptions\IndividualPageSelector $var - * @return $this - */ - public function setIndividualPageSelector($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\ProcessOptions\IndividualPageSelector::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Only process certain pages from the start. Process all if the document - * has fewer pages. - * - * Generated from protobuf field int32 from_start = 6; - * @return int - */ - public function getFromStart() - { - return $this->readOneof(6); - } - - public function hasFromStart() - { - return $this->hasOneof(6); - } - - /** - * Only process certain pages from the start. Process all if the document - * has fewer pages. - * - * Generated from protobuf field int32 from_start = 6; - * @param int $var - * @return $this - */ - public function setFromStart($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Only process certain pages from the end, same as above. - * - * Generated from protobuf field int32 from_end = 7; - * @return int - */ - public function getFromEnd() - { - return $this->readOneof(7); - } - - public function hasFromEnd() - { - return $this->hasOneof(7); - } - - /** - * Only process certain pages from the end, same as above. - * - * Generated from protobuf field int32 from_end = 7; - * @param int $var - * @return $this - */ - public function setFromEnd($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Only applicable to `OCR_PROCESSOR` and `FORM_PARSER_PROCESSOR`. - * Returns error if set on other processor types. - * - * Generated from protobuf field .google.cloud.documentai.v1.OcrConfig ocr_config = 1; - * @return \Google\Cloud\DocumentAI\V1\OcrConfig|null - */ - public function getOcrConfig() - { - return $this->ocr_config; - } - - public function hasOcrConfig() - { - return isset($this->ocr_config); - } - - public function clearOcrConfig() - { - unset($this->ocr_config); - } - - /** - * Only applicable to `OCR_PROCESSOR` and `FORM_PARSER_PROCESSOR`. - * Returns error if set on other processor types. - * - * Generated from protobuf field .google.cloud.documentai.v1.OcrConfig ocr_config = 1; - * @param \Google\Cloud\DocumentAI\V1\OcrConfig $var - * @return $this - */ - public function setOcrConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\OcrConfig::class); - $this->ocr_config = $var; - - return $this; - } - - /** - * Optional. Only applicable to `LAYOUT_PARSER_PROCESSOR`. - * Returns error if set on other processor types. - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessOptions.LayoutConfig layout_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\DocumentAI\V1\ProcessOptions\LayoutConfig|null - */ - public function getLayoutConfig() - { - return $this->layout_config; - } - - public function hasLayoutConfig() - { - return isset($this->layout_config); - } - - public function clearLayoutConfig() - { - unset($this->layout_config); - } - - /** - * Optional. Only applicable to `LAYOUT_PARSER_PROCESSOR`. - * Returns error if set on other processor types. - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessOptions.LayoutConfig layout_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\DocumentAI\V1\ProcessOptions\LayoutConfig $var - * @return $this - */ - public function setLayoutConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\ProcessOptions\LayoutConfig::class); - $this->layout_config = $var; - - return $this; - } - - /** - * Optional. Override the schema of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. Will - * return an Invalid Argument error if this field is set when the underlying - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] doesn't - * support schema override. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema schema_override = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\DocumentAI\V1\DocumentSchema|null - */ - public function getSchemaOverride() - { - return $this->schema_override; - } - - public function hasSchemaOverride() - { - return isset($this->schema_override); - } - - public function clearSchemaOverride() - { - unset($this->schema_override); - } - - /** - * Optional. Override the schema of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. Will - * return an Invalid Argument error if this field is set when the underlying - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] doesn't - * support schema override. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema schema_override = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\DocumentAI\V1\DocumentSchema $var - * @return $this - */ - public function setSchemaOverride($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\DocumentSchema::class); - $this->schema_override = $var; - - return $this; - } - - /** - * @return string - */ - public function getPageRange() - { - return $this->whichOneof("page_range"); - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions/IndividualPageSelector.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions/IndividualPageSelector.php deleted file mode 100644 index 710a5d25c66b..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions/IndividualPageSelector.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.documentai.v1.ProcessOptions.IndividualPageSelector - */ -class IndividualPageSelector extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Indices of the pages (starting from 1). - * - * Generated from protobuf field repeated int32 pages = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $pages; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int[] $pages - * Optional. Indices of the pages (starting from 1). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Indices of the pages (starting from 1). - * - * Generated from protobuf field repeated int32 pages = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField - */ - public function getPages() - { - return $this->pages; - } - - /** - * Optional. Indices of the pages (starting from 1). - * - * Generated from protobuf field repeated int32 pages = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int[] $var - * @return $this - */ - public function setPages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->pages = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions/LayoutConfig.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions/LayoutConfig.php deleted file mode 100644 index e7e7ee9a2e2a..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions/LayoutConfig.php +++ /dev/null @@ -1,217 +0,0 @@ -google.cloud.documentai.v1.ProcessOptions.LayoutConfig - */ -class LayoutConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Config for chunking in layout parser processor. - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessOptions.LayoutConfig.ChunkingConfig chunking_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $chunking_config = null; - /** - * Optional. Whether to include images in layout parser processor response. - * - * Generated from protobuf field bool return_images = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $return_images = false; - /** - * Optional. Whether to include bounding boxes in layout parser processor - * response. - * - * Generated from protobuf field bool return_bounding_boxes = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $return_bounding_boxes = false; - /** - * Optional. Whether to include image annotations in layout parser response. - * - * Generated from protobuf field bool enable_image_annotation = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_image_annotation = false; - /** - * Optional. Whether to include table annotations in layout parser response. - * - * Generated from protobuf field bool enable_table_annotation = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_table_annotation = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\ProcessOptions\LayoutConfig\ChunkingConfig $chunking_config - * Optional. Config for chunking in layout parser processor. - * @type bool $return_images - * Optional. Whether to include images in layout parser processor response. - * @type bool $return_bounding_boxes - * Optional. Whether to include bounding boxes in layout parser processor - * response. - * @type bool $enable_image_annotation - * Optional. Whether to include image annotations in layout parser response. - * @type bool $enable_table_annotation - * Optional. Whether to include table annotations in layout parser response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Config for chunking in layout parser processor. - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessOptions.LayoutConfig.ChunkingConfig chunking_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\DocumentAI\V1\ProcessOptions\LayoutConfig\ChunkingConfig|null - */ - public function getChunkingConfig() - { - return $this->chunking_config; - } - - public function hasChunkingConfig() - { - return isset($this->chunking_config); - } - - public function clearChunkingConfig() - { - unset($this->chunking_config); - } - - /** - * Optional. Config for chunking in layout parser processor. - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessOptions.LayoutConfig.ChunkingConfig chunking_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\DocumentAI\V1\ProcessOptions\LayoutConfig\ChunkingConfig $var - * @return $this - */ - public function setChunkingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\ProcessOptions\LayoutConfig\ChunkingConfig::class); - $this->chunking_config = $var; - - return $this; - } - - /** - * Optional. Whether to include images in layout parser processor response. - * - * Generated from protobuf field bool return_images = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getReturnImages() - { - return $this->return_images; - } - - /** - * Optional. Whether to include images in layout parser processor response. - * - * Generated from protobuf field bool return_images = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setReturnImages($var) - { - GPBUtil::checkBool($var); - $this->return_images = $var; - - return $this; - } - - /** - * Optional. Whether to include bounding boxes in layout parser processor - * response. - * - * Generated from protobuf field bool return_bounding_boxes = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getReturnBoundingBoxes() - { - return $this->return_bounding_boxes; - } - - /** - * Optional. Whether to include bounding boxes in layout parser processor - * response. - * - * Generated from protobuf field bool return_bounding_boxes = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setReturnBoundingBoxes($var) - { - GPBUtil::checkBool($var); - $this->return_bounding_boxes = $var; - - return $this; - } - - /** - * Optional. Whether to include image annotations in layout parser response. - * - * Generated from protobuf field bool enable_image_annotation = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableImageAnnotation() - { - return $this->enable_image_annotation; - } - - /** - * Optional. Whether to include image annotations in layout parser response. - * - * Generated from protobuf field bool enable_image_annotation = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableImageAnnotation($var) - { - GPBUtil::checkBool($var); - $this->enable_image_annotation = $var; - - return $this; - } - - /** - * Optional. Whether to include table annotations in layout parser response. - * - * Generated from protobuf field bool enable_table_annotation = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableTableAnnotation() - { - return $this->enable_table_annotation; - } - - /** - * Optional. Whether to include table annotations in layout parser response. - * - * Generated from protobuf field bool enable_table_annotation = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableTableAnnotation($var) - { - GPBUtil::checkBool($var); - $this->enable_table_annotation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions/LayoutConfig/ChunkingConfig.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions/LayoutConfig/ChunkingConfig.php deleted file mode 100644 index 31aa8c434a1a..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessOptions/LayoutConfig/ChunkingConfig.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.documentai.v1.ProcessOptions.LayoutConfig.ChunkingConfig - */ -class ChunkingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The chunk sizes to use when splitting documents, in order of - * level. - * - * Generated from protobuf field int32 chunk_size = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $chunk_size = 0; - /** - * Optional. Whether or not to include ancestor headings when splitting. - * - * Generated from protobuf field bool include_ancestor_headings = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $include_ancestor_headings = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $chunk_size - * Optional. The chunk sizes to use when splitting documents, in order of - * level. - * @type bool $include_ancestor_headings - * Optional. Whether or not to include ancestor headings when splitting. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The chunk sizes to use when splitting documents, in order of - * level. - * - * Generated from protobuf field int32 chunk_size = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getChunkSize() - { - return $this->chunk_size; - } - - /** - * Optional. The chunk sizes to use when splitting documents, in order of - * level. - * - * Generated from protobuf field int32 chunk_size = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setChunkSize($var) - { - GPBUtil::checkInt32($var); - $this->chunk_size = $var; - - return $this; - } - - /** - * Optional. Whether or not to include ancestor headings when splitting. - * - * Generated from protobuf field bool include_ancestor_headings = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIncludeAncestorHeadings() - { - return $this->include_ancestor_headings; - } - - /** - * Optional. Whether or not to include ancestor headings when splitting. - * - * Generated from protobuf field bool include_ancestor_headings = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIncludeAncestorHeadings($var) - { - GPBUtil::checkBool($var); - $this->include_ancestor_headings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessRequest.php deleted file mode 100644 index 5a4f0e8ad9d1..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessRequest.php +++ /dev/null @@ -1,457 +0,0 @@ -google.cloud.documentai.v1.ProcessRequest - */ -class ProcessRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] or - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] - * to use for processing. If a - * [Processor][google.cloud.documentai.v1.Processor] is specified, the server - * will use its [default - * version][google.cloud.documentai.v1.Processor.default_processor_version]. - * Format: `projects/{project}/locations/{location}/processors/{processor}`, - * or - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Whether human review should be skipped for this request. Default to - * `false`. - * - * Generated from protobuf field bool skip_human_review = 3; - */ - protected $skip_human_review = false; - /** - * Specifies which fields to include in the - * [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document] - * output. Only supports top-level document and pages field, so it must be in - * the form of `{document_field_name}` or `pages.{page_field_name}`. - * - * Generated from protobuf field .google.protobuf.FieldMask field_mask = 6; - */ - protected $field_mask = null; - /** - * Inference-time options for the process API - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessOptions process_options = 7; - */ - protected $process_options = null; - /** - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints) and can only contain lowercase letters, numeric - * characters, underscores, and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * - * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Option to remove images from the document. - * - * Generated from protobuf field bool imageless_mode = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $imageless_mode = false; - protected $source; - - /** - * @param string $name Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] or - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] - * to use for processing. If a - * [Processor][google.cloud.documentai.v1.Processor] is specified, the server - * will use its [default - * version][google.cloud.documentai.v1.Processor.default_processor_version]. - * Format: `projects/{project}/locations/{location}/processors/{processor}`, - * or - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` - * - * @return \Google\Cloud\DocumentAI\V1\ProcessRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Document $inline_document - * An inline document proto. - * @type \Google\Cloud\DocumentAI\V1\RawDocument $raw_document - * A raw document content (bytes). - * @type \Google\Cloud\DocumentAI\V1\GcsDocument $gcs_document - * A raw document on Google Cloud Storage. - * @type string $name - * Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] or - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] - * to use for processing. If a - * [Processor][google.cloud.documentai.v1.Processor] is specified, the server - * will use its [default - * version][google.cloud.documentai.v1.Processor.default_processor_version]. - * Format: `projects/{project}/locations/{location}/processors/{processor}`, - * or - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` - * @type bool $skip_human_review - * Whether human review should be skipped for this request. Default to - * `false`. - * @type \Google\Protobuf\FieldMask $field_mask - * Specifies which fields to include in the - * [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document] - * output. Only supports top-level document and pages field, so it must be in - * the form of `{document_field_name}` or `pages.{page_field_name}`. - * @type \Google\Cloud\DocumentAI\V1\ProcessOptions $process_options - * Inference-time options for the process API - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints) and can only contain lowercase letters, numeric - * characters, underscores, and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * @type bool $imageless_mode - * Optional. Option to remove images from the document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * An inline document proto. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document inline_document = 4; - * @return \Google\Cloud\DocumentAI\V1\Document|null - */ - public function getInlineDocument() - { - return $this->readOneof(4); - } - - public function hasInlineDocument() - { - return $this->hasOneof(4); - } - - /** - * An inline document proto. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document inline_document = 4; - * @param \Google\Cloud\DocumentAI\V1\Document $var - * @return $this - */ - public function setInlineDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * A raw document content (bytes). - * - * Generated from protobuf field .google.cloud.documentai.v1.RawDocument raw_document = 5; - * @return \Google\Cloud\DocumentAI\V1\RawDocument|null - */ - public function getRawDocument() - { - return $this->readOneof(5); - } - - public function hasRawDocument() - { - return $this->hasOneof(5); - } - - /** - * A raw document content (bytes). - * - * Generated from protobuf field .google.cloud.documentai.v1.RawDocument raw_document = 5; - * @param \Google\Cloud\DocumentAI\V1\RawDocument $var - * @return $this - */ - public function setRawDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\RawDocument::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * A raw document on Google Cloud Storage. - * - * Generated from protobuf field .google.cloud.documentai.v1.GcsDocument gcs_document = 8; - * @return \Google\Cloud\DocumentAI\V1\GcsDocument|null - */ - public function getGcsDocument() - { - return $this->readOneof(8); - } - - public function hasGcsDocument() - { - return $this->hasOneof(8); - } - - /** - * A raw document on Google Cloud Storage. - * - * Generated from protobuf field .google.cloud.documentai.v1.GcsDocument gcs_document = 8; - * @param \Google\Cloud\DocumentAI\V1\GcsDocument $var - * @return $this - */ - public function setGcsDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\GcsDocument::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] or - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] - * to use for processing. If a - * [Processor][google.cloud.documentai.v1.Processor] is specified, the server - * will use its [default - * version][google.cloud.documentai.v1.Processor.default_processor_version]. - * Format: `projects/{project}/locations/{location}/processors/{processor}`, - * or - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] or - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] - * to use for processing. If a - * [Processor][google.cloud.documentai.v1.Processor] is specified, the server - * will use its [default - * version][google.cloud.documentai.v1.Processor.default_processor_version]. - * Format: `projects/{project}/locations/{location}/processors/{processor}`, - * or - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Whether human review should be skipped for this request. Default to - * `false`. - * - * Generated from protobuf field bool skip_human_review = 3; - * @return bool - */ - public function getSkipHumanReview() - { - return $this->skip_human_review; - } - - /** - * Whether human review should be skipped for this request. Default to - * `false`. - * - * Generated from protobuf field bool skip_human_review = 3; - * @param bool $var - * @return $this - */ - public function setSkipHumanReview($var) - { - GPBUtil::checkBool($var); - $this->skip_human_review = $var; - - return $this; - } - - /** - * Specifies which fields to include in the - * [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document] - * output. Only supports top-level document and pages field, so it must be in - * the form of `{document_field_name}` or `pages.{page_field_name}`. - * - * Generated from protobuf field .google.protobuf.FieldMask field_mask = 6; - * @return \Google\Protobuf\FieldMask|null - */ - public function getFieldMask() - { - return $this->field_mask; - } - - public function hasFieldMask() - { - return isset($this->field_mask); - } - - public function clearFieldMask() - { - unset($this->field_mask); - } - - /** - * Specifies which fields to include in the - * [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document] - * output. Only supports top-level document and pages field, so it must be in - * the form of `{document_field_name}` or `pages.{page_field_name}`. - * - * Generated from protobuf field .google.protobuf.FieldMask field_mask = 6; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setFieldMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->field_mask = $var; - - return $this; - } - - /** - * Inference-time options for the process API - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessOptions process_options = 7; - * @return \Google\Cloud\DocumentAI\V1\ProcessOptions|null - */ - public function getProcessOptions() - { - return $this->process_options; - } - - public function hasProcessOptions() - { - return isset($this->process_options); - } - - public function clearProcessOptions() - { - unset($this->process_options); - } - - /** - * Inference-time options for the process API - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessOptions process_options = 7; - * @param \Google\Cloud\DocumentAI\V1\ProcessOptions $var - * @return $this - */ - public function setProcessOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\ProcessOptions::class); - $this->process_options = $var; - - return $this; - } - - /** - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints) and can only contain lowercase letters, numeric - * characters, underscores, and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * - * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints) and can only contain lowercase letters, numeric - * characters, underscores, and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * - * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. Option to remove images from the document. - * - * Generated from protobuf field bool imageless_mode = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getImagelessMode() - { - return $this->imageless_mode; - } - - /** - * Optional. Option to remove images from the document. - * - * Generated from protobuf field bool imageless_mode = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setImagelessMode($var) - { - GPBUtil::checkBool($var); - $this->imageless_mode = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessResponse.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessResponse.php deleted file mode 100644 index db0f5d1110bc..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessResponse.php +++ /dev/null @@ -1,127 +0,0 @@ -google.cloud.documentai.v1.ProcessResponse - */ -class ProcessResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The document payload, will populate fields based on the processor's - * behavior. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document document = 1; - */ - protected $document = null; - /** - * The status of human review on the processed document. - * - * Generated from protobuf field .google.cloud.documentai.v1.HumanReviewStatus human_review_status = 3; - */ - protected $human_review_status = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Document $document - * The document payload, will populate fields based on the processor's - * behavior. - * @type \Google\Cloud\DocumentAI\V1\HumanReviewStatus $human_review_status - * The status of human review on the processed document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * The document payload, will populate fields based on the processor's - * behavior. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document document = 1; - * @return \Google\Cloud\DocumentAI\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * The document payload, will populate fields based on the processor's - * behavior. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document document = 1; - * @param \Google\Cloud\DocumentAI\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The status of human review on the processed document. - * - * Generated from protobuf field .google.cloud.documentai.v1.HumanReviewStatus human_review_status = 3; - * @return \Google\Cloud\DocumentAI\V1\HumanReviewStatus|null - */ - public function getHumanReviewStatus() - { - return $this->human_review_status; - } - - public function hasHumanReviewStatus() - { - return isset($this->human_review_status); - } - - public function clearHumanReviewStatus() - { - unset($this->human_review_status); - } - - /** - * The status of human review on the processed document. - * - * Generated from protobuf field .google.cloud.documentai.v1.HumanReviewStatus human_review_status = 3; - * @param \Google\Cloud\DocumentAI\V1\HumanReviewStatus $var - * @return $this - */ - public function setHumanReviewStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\HumanReviewStatus::class); - $this->human_review_status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Processor.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Processor.php deleted file mode 100644 index 8977e45fd4dd..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Processor.php +++ /dev/null @@ -1,438 +0,0 @@ -google.cloud.documentai.v1.Processor - */ -class Processor extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Immutable. The resource name of the processor. - * Format: `projects/{project}/locations/{location}/processors/{processor}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * The processor type, such as: `OCR_PROCESSOR`, `INVOICE_PROCESSOR`. - * To get a list of processor types, see - * [FetchProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.FetchProcessorTypes]. - * - * Generated from protobuf field string type = 2; - */ - protected $type = ''; - /** - * The display name of the processor. - * - * Generated from protobuf field string display_name = 3; - */ - protected $display_name = ''; - /** - * Output only. The state of the processor. - * - * Generated from protobuf field .google.cloud.documentai.v1.Processor.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * The default processor version. - * - * Generated from protobuf field string default_processor_version = 9 [(.google.api.resource_reference) = { - */ - protected $default_processor_version = ''; - /** - * Output only. The processor version aliases. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.ProcessorVersionAlias processor_version_aliases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $processor_version_aliases; - /** - * Output only. Immutable. The http endpoint that can be called to invoke - * processing. - * - * Generated from protobuf field string process_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $process_endpoint = ''; - /** - * Output only. The time the processor was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * The [KMS key](https://cloud.google.com/security-key-management) used for - * encryption and decryption in CMEK scenarios. - * - * Generated from protobuf field string kms_key_name = 8; - */ - protected $kms_key_name = ''; - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzs = false; - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzi = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzi = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Immutable. The resource name of the processor. - * Format: `projects/{project}/locations/{location}/processors/{processor}` - * @type string $type - * The processor type, such as: `OCR_PROCESSOR`, `INVOICE_PROCESSOR`. - * To get a list of processor types, see - * [FetchProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.FetchProcessorTypes]. - * @type string $display_name - * The display name of the processor. - * @type int $state - * Output only. The state of the processor. - * @type string $default_processor_version - * The default processor version. - * @type \Google\Cloud\DocumentAI\V1\ProcessorVersionAlias[] $processor_version_aliases - * Output only. The processor version aliases. - * @type string $process_endpoint - * Output only. Immutable. The http endpoint that can be called to invoke - * processing. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the processor was created. - * @type string $kms_key_name - * The [KMS key](https://cloud.google.com/security-key-management) used for - * encryption and decryption in CMEK scenarios. - * @type bool $satisfies_pzs - * Output only. Reserved for future use. - * @type bool $satisfies_pzi - * Output only. Reserved for future use. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Processor::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Immutable. The resource name of the processor. - * Format: `projects/{project}/locations/{location}/processors/{processor}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Immutable. The resource name of the processor. - * Format: `projects/{project}/locations/{location}/processors/{processor}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The processor type, such as: `OCR_PROCESSOR`, `INVOICE_PROCESSOR`. - * To get a list of processor types, see - * [FetchProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.FetchProcessorTypes]. - * - * Generated from protobuf field string type = 2; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * The processor type, such as: `OCR_PROCESSOR`, `INVOICE_PROCESSOR`. - * To get a list of processor types, see - * [FetchProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.FetchProcessorTypes]. - * - * Generated from protobuf field string type = 2; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * The display name of the processor. - * - * Generated from protobuf field string display_name = 3; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The display name of the processor. - * - * Generated from protobuf field string display_name = 3; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. The state of the processor. - * - * Generated from protobuf field .google.cloud.documentai.v1.Processor.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the processor. - * - * Generated from protobuf field .google.cloud.documentai.v1.Processor.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\Processor\State::class); - $this->state = $var; - - return $this; - } - - /** - * The default processor version. - * - * Generated from protobuf field string default_processor_version = 9 [(.google.api.resource_reference) = { - * @return string - */ - public function getDefaultProcessorVersion() - { - return $this->default_processor_version; - } - - /** - * The default processor version. - * - * Generated from protobuf field string default_processor_version = 9 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDefaultProcessorVersion($var) - { - GPBUtil::checkString($var, True); - $this->default_processor_version = $var; - - return $this; - } - - /** - * Output only. The processor version aliases. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.ProcessorVersionAlias processor_version_aliases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\ProcessorVersionAlias> - */ - public function getProcessorVersionAliases() - { - return $this->processor_version_aliases; - } - - /** - * Output only. The processor version aliases. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.ProcessorVersionAlias processor_version_aliases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\DocumentAI\V1\ProcessorVersionAlias[] $var - * @return $this - */ - public function setProcessorVersionAliases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\ProcessorVersionAlias::class); - $this->processor_version_aliases = $arr; - - return $this; - } - - /** - * Output only. Immutable. The http endpoint that can be called to invoke - * processing. - * - * Generated from protobuf field string process_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getProcessEndpoint() - { - return $this->process_endpoint; - } - - /** - * Output only. Immutable. The http endpoint that can be called to invoke - * processing. - * - * Generated from protobuf field string process_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setProcessEndpoint($var) - { - GPBUtil::checkString($var, True); - $this->process_endpoint = $var; - - return $this; - } - - /** - * Output only. The time the processor was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the processor was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The [KMS key](https://cloud.google.com/security-key-management) used for - * encryption and decryption in CMEK scenarios. - * - * Generated from protobuf field string kms_key_name = 8; - * @return string - */ - public function getKmsKeyName() - { - return $this->kms_key_name; - } - - /** - * The [KMS key](https://cloud.google.com/security-key-management) used for - * encryption and decryption in CMEK scenarios. - * - * Generated from protobuf field string kms_key_name = 8; - * @param string $var - * @return $this - */ - public function setKmsKeyName($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_name = $var; - - return $this; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getSatisfiesPzs() - { - return $this->satisfies_pzs; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSatisfiesPzs($var) - { - GPBUtil::checkBool($var); - $this->satisfies_pzs = $var; - - return $this; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzi = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getSatisfiesPzi() - { - return $this->satisfies_pzi; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzi = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSatisfiesPzi($var) - { - GPBUtil::checkBool($var); - $this->satisfies_pzi = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Processor/State.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Processor/State.php deleted file mode 100644 index 35136b77d52e..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Processor/State.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.documentai.v1.Processor.State - */ -class State -{ - /** - * The processor is in an unspecified state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The processor is enabled, i.e., has an enabled version which can - * currently serve processing requests and all the feature dependencies have - * been successfully initialized. - * - * Generated from protobuf enum ENABLED = 1; - */ - const ENABLED = 1; - /** - * The processor is disabled. - * - * Generated from protobuf enum DISABLED = 2; - */ - const DISABLED = 2; - /** - * The processor is being enabled, will become `ENABLED` if successful. - * - * Generated from protobuf enum ENABLING = 3; - */ - const ENABLING = 3; - /** - * The processor is being disabled, will become `DISABLED` if successful. - * - * Generated from protobuf enum DISABLING = 4; - */ - const DISABLING = 4; - /** - * The processor is being created, will become either `ENABLED` (for - * successful creation) or `FAILED` (for failed ones). - * Once a processor is in this state, it can then be used for document - * processing, but the feature dependencies of the processor might not be - * fully created yet. - * - * Generated from protobuf enum CREATING = 5; - */ - const CREATING = 5; - /** - * The processor failed during creation or initialization of feature - * dependencies. The user should delete the processor and recreate one as - * all the functionalities of the processor are disabled. - * - * Generated from protobuf enum FAILED = 6; - */ - const FAILED = 6; - /** - * The processor is being deleted, will be removed if successful. - * - * Generated from protobuf enum DELETING = 7; - */ - const DELETING = 7; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ENABLED => 'ENABLED', - self::DISABLED => 'DISABLED', - self::ENABLING => 'ENABLING', - self::DISABLING => 'DISABLING', - self::CREATING => 'CREATING', - self::FAILED => 'FAILED', - self::DELETING => 'DELETING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorType.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorType.php deleted file mode 100644 index f368f59971c8..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorType.php +++ /dev/null @@ -1,280 +0,0 @@ -google.cloud.documentai.v1.ProcessorType - */ -class ProcessorType extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the processor type. - * Format: `projects/{project}/processorTypes/{processor_type}` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The processor type, such as: `OCR_PROCESSOR`, `INVOICE_PROCESSOR`. - * - * Generated from protobuf field string type = 2; - */ - protected $type = ''; - /** - * The processor category, used by UI to group processor types. - * - * Generated from protobuf field string category = 3; - */ - protected $category = ''; - /** - * The locations in which this processor is available. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.ProcessorType.LocationInfo available_locations = 4; - */ - private $available_locations; - /** - * Whether the processor type allows creation. If true, users can create a - * processor of this processor type. Otherwise, users need to request access. - * - * Generated from protobuf field bool allow_creation = 6; - */ - protected $allow_creation = false; - /** - * Launch stage of the processor type - * - * Generated from protobuf field .google.api.LaunchStage launch_stage = 8; - */ - protected $launch_stage = 0; - /** - * A set of Cloud Storage URIs of sample documents for this processor. - * - * Generated from protobuf field repeated string sample_document_uris = 9; - */ - private $sample_document_uris; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the processor type. - * Format: `projects/{project}/processorTypes/{processor_type}` - * @type string $type - * The processor type, such as: `OCR_PROCESSOR`, `INVOICE_PROCESSOR`. - * @type string $category - * The processor category, used by UI to group processor types. - * @type \Google\Cloud\DocumentAI\V1\ProcessorType\LocationInfo[] $available_locations - * The locations in which this processor is available. - * @type bool $allow_creation - * Whether the processor type allows creation. If true, users can create a - * processor of this processor type. Otherwise, users need to request access. - * @type int $launch_stage - * Launch stage of the processor type - * @type string[] $sample_document_uris - * A set of Cloud Storage URIs of sample documents for this processor. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\ProcessorType::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the processor type. - * Format: `projects/{project}/processorTypes/{processor_type}` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the processor type. - * Format: `projects/{project}/processorTypes/{processor_type}` - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The processor type, such as: `OCR_PROCESSOR`, `INVOICE_PROCESSOR`. - * - * Generated from protobuf field string type = 2; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * The processor type, such as: `OCR_PROCESSOR`, `INVOICE_PROCESSOR`. - * - * Generated from protobuf field string type = 2; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * The processor category, used by UI to group processor types. - * - * Generated from protobuf field string category = 3; - * @return string - */ - public function getCategory() - { - return $this->category; - } - - /** - * The processor category, used by UI to group processor types. - * - * Generated from protobuf field string category = 3; - * @param string $var - * @return $this - */ - public function setCategory($var) - { - GPBUtil::checkString($var, True); - $this->category = $var; - - return $this; - } - - /** - * The locations in which this processor is available. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.ProcessorType.LocationInfo available_locations = 4; - * @return RepeatedField<\Google\Cloud\DocumentAI\V1\ProcessorType\LocationInfo> - */ - public function getAvailableLocations() - { - return $this->available_locations; - } - - /** - * The locations in which this processor is available. - * - * Generated from protobuf field repeated .google.cloud.documentai.v1.ProcessorType.LocationInfo available_locations = 4; - * @param \Google\Cloud\DocumentAI\V1\ProcessorType\LocationInfo[] $var - * @return $this - */ - public function setAvailableLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\ProcessorType\LocationInfo::class); - $this->available_locations = $arr; - - return $this; - } - - /** - * Whether the processor type allows creation. If true, users can create a - * processor of this processor type. Otherwise, users need to request access. - * - * Generated from protobuf field bool allow_creation = 6; - * @return bool - */ - public function getAllowCreation() - { - return $this->allow_creation; - } - - /** - * Whether the processor type allows creation. If true, users can create a - * processor of this processor type. Otherwise, users need to request access. - * - * Generated from protobuf field bool allow_creation = 6; - * @param bool $var - * @return $this - */ - public function setAllowCreation($var) - { - GPBUtil::checkBool($var); - $this->allow_creation = $var; - - return $this; - } - - /** - * Launch stage of the processor type - * - * Generated from protobuf field .google.api.LaunchStage launch_stage = 8; - * @return int - */ - public function getLaunchStage() - { - return $this->launch_stage; - } - - /** - * Launch stage of the processor type - * - * Generated from protobuf field .google.api.LaunchStage launch_stage = 8; - * @param int $var - * @return $this - */ - public function setLaunchStage($var) - { - GPBUtil::checkEnum($var, \Google\Api\LaunchStage::class); - $this->launch_stage = $var; - - return $this; - } - - /** - * A set of Cloud Storage URIs of sample documents for this processor. - * - * Generated from protobuf field repeated string sample_document_uris = 9; - * @return RepeatedField - */ - public function getSampleDocumentUris() - { - return $this->sample_document_uris; - } - - /** - * A set of Cloud Storage URIs of sample documents for this processor. - * - * Generated from protobuf field repeated string sample_document_uris = 9; - * @param string[] $var - * @return $this - */ - public function setSampleDocumentUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->sample_document_uris = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorType/LocationInfo.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorType/LocationInfo.php deleted file mode 100644 index e4121d9355f7..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorType/LocationInfo.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.documentai.v1.ProcessorType.LocationInfo - */ -class LocationInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The location ID. For supported locations, refer to [regional and - * multi-regional support](/document-ai/docs/regions). - * - * Generated from protobuf field string location_id = 1; - */ - protected $location_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $location_id - * The location ID. For supported locations, refer to [regional and - * multi-regional support](/document-ai/docs/regions). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\ProcessorType::initOnce(); - parent::__construct($data); - } - - /** - * The location ID. For supported locations, refer to [regional and - * multi-regional support](/document-ai/docs/regions). - * - * Generated from protobuf field string location_id = 1; - * @return string - */ - public function getLocationId() - { - return $this->location_id; - } - - /** - * The location ID. For supported locations, refer to [regional and - * multi-regional support](/document-ai/docs/regions). - * - * Generated from protobuf field string location_id = 1; - * @param string $var - * @return $this - */ - public function setLocationId($var) - { - GPBUtil::checkString($var, True); - $this->location_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion.php deleted file mode 100644 index 7e80962ea6ae..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion.php +++ /dev/null @@ -1,582 +0,0 @@ -google.cloud.documentai.v1.ProcessorVersion - */ -class ProcessorVersion extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name of the processor version. - * Format: - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * The display name of the processor version. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * Output only. The schema of the processor version. Describes the output. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema document_schema = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $document_schema = null; - /** - * Output only. The state of the processor version. - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The time the processor version was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The most recently invoked evaluation for the processor - * version. - * - * Generated from protobuf field .google.cloud.documentai.v1.EvaluationReference latest_evaluation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $latest_evaluation = null; - /** - * Output only. The KMS key name used for encryption. - * - * Generated from protobuf field string kms_key_name = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $kms_key_name = ''; - /** - * Output only. The KMS key version with which data is encrypted. - * - * Generated from protobuf field string kms_key_version_name = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $kms_key_version_name = ''; - /** - * Output only. Denotes that this `ProcessorVersion` is managed by Google. - * - * Generated from protobuf field bool google_managed = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $google_managed = false; - /** - * Output only. If set, information about the eventual deprecation of this - * version. - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.DeprecationInfo deprecation_info = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $deprecation_info = null; - /** - * Output only. The model type of this processor version. - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.ModelType model_type = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $model_type = 0; - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzs = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzs = false; - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzi = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzi = false; - /** - * Output only. Information about Generative AI model-based processor - * versions. - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo gen_ai_model_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $gen_ai_model_info = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name of the processor version. - * Format: - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}` - * @type string $display_name - * The display name of the processor version. - * @type \Google\Cloud\DocumentAI\V1\DocumentSchema $document_schema - * Output only. The schema of the processor version. Describes the output. - * @type int $state - * Output only. The state of the processor version. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the processor version was created. - * @type \Google\Cloud\DocumentAI\V1\EvaluationReference $latest_evaluation - * Output only. The most recently invoked evaluation for the processor - * version. - * @type string $kms_key_name - * Output only. The KMS key name used for encryption. - * @type string $kms_key_version_name - * Output only. The KMS key version with which data is encrypted. - * @type bool $google_managed - * Output only. Denotes that this `ProcessorVersion` is managed by Google. - * @type \Google\Cloud\DocumentAI\V1\ProcessorVersion\DeprecationInfo $deprecation_info - * Output only. If set, information about the eventual deprecation of this - * version. - * @type int $model_type - * Output only. The model type of this processor version. - * @type bool $satisfies_pzs - * Output only. Reserved for future use. - * @type bool $satisfies_pzi - * Output only. Reserved for future use. - * @type \Google\Cloud\DocumentAI\V1\ProcessorVersion\GenAiModelInfo $gen_ai_model_info - * Output only. Information about Generative AI model-based processor - * versions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Processor::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name of the processor version. - * Format: - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name of the processor version. - * Format: - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The display name of the processor version. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The display name of the processor version. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. The schema of the processor version. Describes the output. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema document_schema = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\DocumentAI\V1\DocumentSchema|null - */ - public function getDocumentSchema() - { - return $this->document_schema; - } - - public function hasDocumentSchema() - { - return isset($this->document_schema); - } - - public function clearDocumentSchema() - { - unset($this->document_schema); - } - - /** - * Output only. The schema of the processor version. Describes the output. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema document_schema = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\DocumentAI\V1\DocumentSchema $var - * @return $this - */ - public function setDocumentSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\DocumentSchema::class); - $this->document_schema = $var; - - return $this; - } - - /** - * Output only. The state of the processor version. - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the processor version. - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\ProcessorVersion\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The time the processor version was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the processor version was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The most recently invoked evaluation for the processor - * version. - * - * Generated from protobuf field .google.cloud.documentai.v1.EvaluationReference latest_evaluation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\DocumentAI\V1\EvaluationReference|null - */ - public function getLatestEvaluation() - { - return $this->latest_evaluation; - } - - public function hasLatestEvaluation() - { - return isset($this->latest_evaluation); - } - - public function clearLatestEvaluation() - { - unset($this->latest_evaluation); - } - - /** - * Output only. The most recently invoked evaluation for the processor - * version. - * - * Generated from protobuf field .google.cloud.documentai.v1.EvaluationReference latest_evaluation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\DocumentAI\V1\EvaluationReference $var - * @return $this - */ - public function setLatestEvaluation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\EvaluationReference::class); - $this->latest_evaluation = $var; - - return $this; - } - - /** - * Output only. The KMS key name used for encryption. - * - * Generated from protobuf field string kms_key_name = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getKmsKeyName() - { - return $this->kms_key_name; - } - - /** - * Output only. The KMS key name used for encryption. - * - * Generated from protobuf field string kms_key_name = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setKmsKeyName($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_name = $var; - - return $this; - } - - /** - * Output only. The KMS key version with which data is encrypted. - * - * Generated from protobuf field string kms_key_version_name = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getKmsKeyVersionName() - { - return $this->kms_key_version_name; - } - - /** - * Output only. The KMS key version with which data is encrypted. - * - * Generated from protobuf field string kms_key_version_name = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setKmsKeyVersionName($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_version_name = $var; - - return $this; - } - - /** - * Output only. Denotes that this `ProcessorVersion` is managed by Google. - * - * Generated from protobuf field bool google_managed = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getGoogleManaged() - { - return $this->google_managed; - } - - /** - * Output only. Denotes that this `ProcessorVersion` is managed by Google. - * - * Generated from protobuf field bool google_managed = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setGoogleManaged($var) - { - GPBUtil::checkBool($var); - $this->google_managed = $var; - - return $this; - } - - /** - * Output only. If set, information about the eventual deprecation of this - * version. - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.DeprecationInfo deprecation_info = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\DocumentAI\V1\ProcessorVersion\DeprecationInfo|null - */ - public function getDeprecationInfo() - { - return $this->deprecation_info; - } - - public function hasDeprecationInfo() - { - return isset($this->deprecation_info); - } - - public function clearDeprecationInfo() - { - unset($this->deprecation_info); - } - - /** - * Output only. If set, information about the eventual deprecation of this - * version. - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.DeprecationInfo deprecation_info = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\DocumentAI\V1\ProcessorVersion\DeprecationInfo $var - * @return $this - */ - public function setDeprecationInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\ProcessorVersion\DeprecationInfo::class); - $this->deprecation_info = $var; - - return $this; - } - - /** - * Output only. The model type of this processor version. - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.ModelType model_type = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getModelType() - { - return $this->model_type; - } - - /** - * Output only. The model type of this processor version. - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.ModelType model_type = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setModelType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\ProcessorVersion\ModelType::class); - $this->model_type = $var; - - return $this; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzs = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getSatisfiesPzs() - { - return $this->satisfies_pzs; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzs = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSatisfiesPzs($var) - { - GPBUtil::checkBool($var); - $this->satisfies_pzs = $var; - - return $this; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzi = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getSatisfiesPzi() - { - return $this->satisfies_pzi; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzi = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSatisfiesPzi($var) - { - GPBUtil::checkBool($var); - $this->satisfies_pzi = $var; - - return $this; - } - - /** - * Output only. Information about Generative AI model-based processor - * versions. - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo gen_ai_model_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\DocumentAI\V1\ProcessorVersion\GenAiModelInfo|null - */ - public function getGenAiModelInfo() - { - return $this->gen_ai_model_info; - } - - public function hasGenAiModelInfo() - { - return isset($this->gen_ai_model_info); - } - - public function clearGenAiModelInfo() - { - unset($this->gen_ai_model_info); - } - - /** - * Output only. Information about Generative AI model-based processor - * versions. - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo gen_ai_model_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\DocumentAI\V1\ProcessorVersion\GenAiModelInfo $var - * @return $this - */ - public function setGenAiModelInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\ProcessorVersion\GenAiModelInfo::class); - $this->gen_ai_model_info = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/DeprecationInfo.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/DeprecationInfo.php deleted file mode 100644 index 9d8c25b77f55..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/DeprecationInfo.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.documentai.v1.ProcessorVersion.DeprecationInfo - */ -class DeprecationInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The time at which this processor version will be deprecated. - * - * Generated from protobuf field .google.protobuf.Timestamp deprecation_time = 1; - */ - protected $deprecation_time = null; - /** - * If set, the processor version that will be used as a replacement. - * - * Generated from protobuf field string replacement_processor_version = 2 [(.google.api.resource_reference) = { - */ - protected $replacement_processor_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $deprecation_time - * The time at which this processor version will be deprecated. - * @type string $replacement_processor_version - * If set, the processor version that will be used as a replacement. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Processor::initOnce(); - parent::__construct($data); - } - - /** - * The time at which this processor version will be deprecated. - * - * Generated from protobuf field .google.protobuf.Timestamp deprecation_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeprecationTime() - { - return $this->deprecation_time; - } - - public function hasDeprecationTime() - { - return isset($this->deprecation_time); - } - - public function clearDeprecationTime() - { - unset($this->deprecation_time); - } - - /** - * The time at which this processor version will be deprecated. - * - * Generated from protobuf field .google.protobuf.Timestamp deprecation_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeprecationTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->deprecation_time = $var; - - return $this; - } - - /** - * If set, the processor version that will be used as a replacement. - * - * Generated from protobuf field string replacement_processor_version = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getReplacementProcessorVersion() - { - return $this->replacement_processor_version; - } - - /** - * If set, the processor version that will be used as a replacement. - * - * Generated from protobuf field string replacement_processor_version = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setReplacementProcessorVersion($var) - { - GPBUtil::checkString($var, True); - $this->replacement_processor_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo.php deleted file mode 100644 index 966905e2b44e..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo - */ -class GenAiModelInfo extends \Google\Protobuf\Internal\Message -{ - protected $model_info; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\ProcessorVersion\GenAiModelInfo\FoundationGenAiModelInfo $foundation_gen_ai_model_info - * Information for a pretrained Google-managed foundation model. - * @type \Google\Cloud\DocumentAI\V1\ProcessorVersion\GenAiModelInfo\CustomGenAiModelInfo $custom_gen_ai_model_info - * Information for a custom Generative AI model created by the user. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Processor::initOnce(); - parent::__construct($data); - } - - /** - * Information for a pretrained Google-managed foundation model. - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.FoundationGenAiModelInfo foundation_gen_ai_model_info = 1; - * @return \Google\Cloud\DocumentAI\V1\ProcessorVersion\GenAiModelInfo\FoundationGenAiModelInfo|null - */ - public function getFoundationGenAiModelInfo() - { - return $this->readOneof(1); - } - - public function hasFoundationGenAiModelInfo() - { - return $this->hasOneof(1); - } - - /** - * Information for a pretrained Google-managed foundation model. - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.FoundationGenAiModelInfo foundation_gen_ai_model_info = 1; - * @param \Google\Cloud\DocumentAI\V1\ProcessorVersion\GenAiModelInfo\FoundationGenAiModelInfo $var - * @return $this - */ - public function setFoundationGenAiModelInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\ProcessorVersion\GenAiModelInfo\FoundationGenAiModelInfo::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Information for a custom Generative AI model created by the user. - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.CustomGenAiModelInfo custom_gen_ai_model_info = 2; - * @return \Google\Cloud\DocumentAI\V1\ProcessorVersion\GenAiModelInfo\CustomGenAiModelInfo|null - */ - public function getCustomGenAiModelInfo() - { - return $this->readOneof(2); - } - - public function hasCustomGenAiModelInfo() - { - return $this->hasOneof(2); - } - - /** - * Information for a custom Generative AI model created by the user. - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.CustomGenAiModelInfo custom_gen_ai_model_info = 2; - * @param \Google\Cloud\DocumentAI\V1\ProcessorVersion\GenAiModelInfo\CustomGenAiModelInfo $var - * @return $this - */ - public function setCustomGenAiModelInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\ProcessorVersion\GenAiModelInfo\CustomGenAiModelInfo::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getModelInfo() - { - return $this->whichOneof("model_info"); - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo/CustomGenAiModelInfo.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo/CustomGenAiModelInfo.php deleted file mode 100644 index 687c118fa648..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo/CustomGenAiModelInfo.php +++ /dev/null @@ -1,103 +0,0 @@ -google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.CustomGenAiModelInfo - */ -class CustomGenAiModelInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The type of custom model created by the user. - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.CustomGenAiModelInfo.CustomModelType custom_model_type = 1; - */ - protected $custom_model_type = 0; - /** - * The base processor version ID for the custom model. - * - * Generated from protobuf field string base_processor_version_id = 2; - */ - protected $base_processor_version_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $custom_model_type - * The type of custom model created by the user. - * @type string $base_processor_version_id - * The base processor version ID for the custom model. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Processor::initOnce(); - parent::__construct($data); - } - - /** - * The type of custom model created by the user. - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.CustomGenAiModelInfo.CustomModelType custom_model_type = 1; - * @return int - */ - public function getCustomModelType() - { - return $this->custom_model_type; - } - - /** - * The type of custom model created by the user. - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.CustomGenAiModelInfo.CustomModelType custom_model_type = 1; - * @param int $var - * @return $this - */ - public function setCustomModelType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\ProcessorVersion\GenAiModelInfo\CustomGenAiModelInfo\CustomModelType::class); - $this->custom_model_type = $var; - - return $this; - } - - /** - * The base processor version ID for the custom model. - * - * Generated from protobuf field string base_processor_version_id = 2; - * @return string - */ - public function getBaseProcessorVersionId() - { - return $this->base_processor_version_id; - } - - /** - * The base processor version ID for the custom model. - * - * Generated from protobuf field string base_processor_version_id = 2; - * @param string $var - * @return $this - */ - public function setBaseProcessorVersionId($var) - { - GPBUtil::checkString($var, True); - $this->base_processor_version_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo/CustomGenAiModelInfo/CustomModelType.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo/CustomGenAiModelInfo/CustomModelType.php deleted file mode 100644 index 47560b06581b..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo/CustomGenAiModelInfo/CustomModelType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.CustomGenAiModelInfo.CustomModelType - */ -class CustomModelType -{ - /** - * The model type is unspecified. - * - * Generated from protobuf enum CUSTOM_MODEL_TYPE_UNSPECIFIED = 0; - */ - const CUSTOM_MODEL_TYPE_UNSPECIFIED = 0; - /** - * The model is a versioned foundation model. - * - * Generated from protobuf enum VERSIONED_FOUNDATION = 1; - */ - const VERSIONED_FOUNDATION = 1; - /** - * The model is a finetuned foundation model. - * - * Generated from protobuf enum FINE_TUNED = 2; - */ - const FINE_TUNED = 2; - - private static $valueToName = [ - self::CUSTOM_MODEL_TYPE_UNSPECIFIED => 'CUSTOM_MODEL_TYPE_UNSPECIFIED', - self::VERSIONED_FOUNDATION => 'VERSIONED_FOUNDATION', - self::FINE_TUNED => 'FINE_TUNED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo/FoundationGenAiModelInfo.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo/FoundationGenAiModelInfo.php deleted file mode 100644 index 812e5a36c072..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/GenAiModelInfo/FoundationGenAiModelInfo.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.documentai.v1.ProcessorVersion.GenAiModelInfo.FoundationGenAiModelInfo - */ -class FoundationGenAiModelInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Whether finetuning is allowed for this base processor version. - * - * Generated from protobuf field bool finetuning_allowed = 1; - */ - protected $finetuning_allowed = false; - /** - * The minimum number of labeled documents in the training dataset - * required for finetuning. - * - * Generated from protobuf field int32 min_train_labeled_documents = 2; - */ - protected $min_train_labeled_documents = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $finetuning_allowed - * Whether finetuning is allowed for this base processor version. - * @type int $min_train_labeled_documents - * The minimum number of labeled documents in the training dataset - * required for finetuning. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Processor::initOnce(); - parent::__construct($data); - } - - /** - * Whether finetuning is allowed for this base processor version. - * - * Generated from protobuf field bool finetuning_allowed = 1; - * @return bool - */ - public function getFinetuningAllowed() - { - return $this->finetuning_allowed; - } - - /** - * Whether finetuning is allowed for this base processor version. - * - * Generated from protobuf field bool finetuning_allowed = 1; - * @param bool $var - * @return $this - */ - public function setFinetuningAllowed($var) - { - GPBUtil::checkBool($var); - $this->finetuning_allowed = $var; - - return $this; - } - - /** - * The minimum number of labeled documents in the training dataset - * required for finetuning. - * - * Generated from protobuf field int32 min_train_labeled_documents = 2; - * @return int - */ - public function getMinTrainLabeledDocuments() - { - return $this->min_train_labeled_documents; - } - - /** - * The minimum number of labeled documents in the training dataset - * required for finetuning. - * - * Generated from protobuf field int32 min_train_labeled_documents = 2; - * @param int $var - * @return $this - */ - public function setMinTrainLabeledDocuments($var) - { - GPBUtil::checkInt32($var); - $this->min_train_labeled_documents = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/ModelType.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/ModelType.php deleted file mode 100644 index d62c7a97b6c6..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/ModelType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.documentai.v1.ProcessorVersion.ModelType - */ -class ModelType -{ - /** - * The processor version has unspecified model type. - * - * Generated from protobuf enum MODEL_TYPE_UNSPECIFIED = 0; - */ - const MODEL_TYPE_UNSPECIFIED = 0; - /** - * The processor version has generative model type. - * - * Generated from protobuf enum MODEL_TYPE_GENERATIVE = 1; - */ - const MODEL_TYPE_GENERATIVE = 1; - /** - * The processor version has custom model type. - * - * Generated from protobuf enum MODEL_TYPE_CUSTOM = 2; - */ - const MODEL_TYPE_CUSTOM = 2; - - private static $valueToName = [ - self::MODEL_TYPE_UNSPECIFIED => 'MODEL_TYPE_UNSPECIFIED', - self::MODEL_TYPE_GENERATIVE => 'MODEL_TYPE_GENERATIVE', - self::MODEL_TYPE_CUSTOM => 'MODEL_TYPE_CUSTOM', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/State.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/State.php deleted file mode 100644 index c6c4ab8afac6..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersion/State.php +++ /dev/null @@ -1,103 +0,0 @@ -google.cloud.documentai.v1.ProcessorVersion.State - */ -class State -{ - /** - * The processor version is in an unspecified state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The processor version is deployed and can be used for processing. - * - * Generated from protobuf enum DEPLOYED = 1; - */ - const DEPLOYED = 1; - /** - * The processor version is being deployed. - * - * Generated from protobuf enum DEPLOYING = 2; - */ - const DEPLOYING = 2; - /** - * The processor version is not deployed and cannot be used for processing. - * - * Generated from protobuf enum UNDEPLOYED = 3; - */ - const UNDEPLOYED = 3; - /** - * The processor version is being undeployed. - * - * Generated from protobuf enum UNDEPLOYING = 4; - */ - const UNDEPLOYING = 4; - /** - * The processor version is being created. - * - * Generated from protobuf enum CREATING = 5; - */ - const CREATING = 5; - /** - * The processor version is being deleted. - * - * Generated from protobuf enum DELETING = 6; - */ - const DELETING = 6; - /** - * The processor version failed and is in an indeterminate state. - * - * Generated from protobuf enum FAILED = 7; - */ - const FAILED = 7; - /** - * The processor version is being imported. - * - * Generated from protobuf enum IMPORTING = 8; - */ - const IMPORTING = 8; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::DEPLOYED => 'DEPLOYED', - self::DEPLOYING => 'DEPLOYING', - self::UNDEPLOYED => 'UNDEPLOYED', - self::UNDEPLOYING => 'UNDEPLOYING', - self::CREATING => 'CREATING', - self::DELETING => 'DELETING', - self::FAILED => 'FAILED', - self::IMPORTING => 'IMPORTING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersionAlias.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersionAlias.php deleted file mode 100644 index 09174062b494..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ProcessorVersionAlias.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.documentai.v1.ProcessorVersionAlias - */ -class ProcessorVersionAlias extends \Google\Protobuf\Internal\Message -{ - /** - * The alias in the form of `processor_version` resource name. - * - * Generated from protobuf field string alias = 1; - */ - protected $alias = ''; - /** - * The resource name of aliased processor version. - * - * Generated from protobuf field string processor_version = 2 [(.google.api.resource_reference) = { - */ - protected $processor_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $alias - * The alias in the form of `processor_version` resource name. - * @type string $processor_version - * The resource name of aliased processor version. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Processor::initOnce(); - parent::__construct($data); - } - - /** - * The alias in the form of `processor_version` resource name. - * - * Generated from protobuf field string alias = 1; - * @return string - */ - public function getAlias() - { - return $this->alias; - } - - /** - * The alias in the form of `processor_version` resource name. - * - * Generated from protobuf field string alias = 1; - * @param string $var - * @return $this - */ - public function setAlias($var) - { - GPBUtil::checkString($var, True); - $this->alias = $var; - - return $this; - } - - /** - * The resource name of aliased processor version. - * - * Generated from protobuf field string processor_version = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getProcessorVersion() - { - return $this->processor_version; - } - - /** - * The resource name of aliased processor version. - * - * Generated from protobuf field string processor_version = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setProcessorVersion($var) - { - GPBUtil::checkString($var, True); - $this->processor_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/RawDocument.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/RawDocument.php deleted file mode 100644 index 37a44014ca10..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/RawDocument.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.documentai.v1.RawDocument - */ -class RawDocument extends \Google\Protobuf\Internal\Message -{ - /** - * Inline document content. - * - * Generated from protobuf field bytes content = 1; - */ - protected $content = ''; - /** - * An IANA MIME type (RFC6838) indicating the nature and format of the - * [content][google.cloud.documentai.v1.RawDocument.content]. - * - * Generated from protobuf field string mime_type = 2; - */ - protected $mime_type = ''; - /** - * The display name of the document, it supports all Unicode characters except - * the following: - * `*`, `?`, `[`, `]`, `%`, `{`, `}`,`'`, `\"`, `,` - * `~`, `=` and `:` are reserved. - * If not specified, a default ID is generated. - * - * Generated from protobuf field string display_name = 3; - */ - protected $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $content - * Inline document content. - * @type string $mime_type - * An IANA MIME type (RFC6838) indicating the nature and format of the - * [content][google.cloud.documentai.v1.RawDocument.content]. - * @type string $display_name - * The display name of the document, it supports all Unicode characters except - * the following: - * `*`, `?`, `[`, `]`, `%`, `{`, `}`,`'`, `\"`, `,` - * `~`, `=` and `:` are reserved. - * If not specified, a default ID is generated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentIo::initOnce(); - parent::__construct($data); - } - - /** - * Inline document content. - * - * Generated from protobuf field bytes content = 1; - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * Inline document content. - * - * Generated from protobuf field bytes content = 1; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, False); - $this->content = $var; - - return $this; - } - - /** - * An IANA MIME type (RFC6838) indicating the nature and format of the - * [content][google.cloud.documentai.v1.RawDocument.content]. - * - * Generated from protobuf field string mime_type = 2; - * @return string - */ - public function getMimeType() - { - return $this->mime_type; - } - - /** - * An IANA MIME type (RFC6838) indicating the nature and format of the - * [content][google.cloud.documentai.v1.RawDocument.content]. - * - * Generated from protobuf field string mime_type = 2; - * @param string $var - * @return $this - */ - public function setMimeType($var) - { - GPBUtil::checkString($var, True); - $this->mime_type = $var; - - return $this; - } - - /** - * The display name of the document, it supports all Unicode characters except - * the following: - * `*`, `?`, `[`, `]`, `%`, `{`, `}`,`'`, `\"`, `,` - * `~`, `=` and `:` are reserved. - * If not specified, a default ID is generated. - * - * Generated from protobuf field string display_name = 3; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The display name of the document, it supports all Unicode characters except - * the following: - * `*`, `?`, `[`, `]`, `%`, `{`, `}`,`'`, `\"`, `,` - * `~`, `=` and `:` are reserved. - * If not specified, a default ID is generated. - * - * Generated from protobuf field string display_name = 3; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentOperationMetadata.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentOperationMetadata.php deleted file mode 100644 index d695546d88f1..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentOperationMetadata.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.documentai.v1.ReviewDocumentOperationMetadata - */ -class ReviewDocumentOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The basic metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 5; - */ - protected $common_metadata = null; - /** - * The Crowd Compute question ID. - * - * Generated from protobuf field string question_id = 6; - */ - protected $question_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $common_metadata - * The basic metadata of the long-running operation. - * @type string $question_id - * The Crowd Compute question ID. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * The basic metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 5; - * @return \Google\Cloud\DocumentAI\V1\CommonOperationMetadata|null - */ - public function getCommonMetadata() - { - return $this->common_metadata; - } - - public function hasCommonMetadata() - { - return isset($this->common_metadata); - } - - public function clearCommonMetadata() - { - unset($this->common_metadata); - } - - /** - * The basic metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 5; - * @param \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $var - * @return $this - */ - public function setCommonMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\CommonOperationMetadata::class); - $this->common_metadata = $var; - - return $this; - } - - /** - * The Crowd Compute question ID. - * - * Generated from protobuf field string question_id = 6; - * @return string - */ - public function getQuestionId() - { - return $this->question_id; - } - - /** - * The Crowd Compute question ID. - * - * Generated from protobuf field string question_id = 6; - * @param string $var - * @return $this - */ - public function setQuestionId($var) - { - GPBUtil::checkString($var, True); - $this->question_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentRequest.php deleted file mode 100644 index a7c6debf806d..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentRequest.php +++ /dev/null @@ -1,247 +0,0 @@ -google.cloud.documentai.v1.ReviewDocumentRequest - */ -class ReviewDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the - * [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the - * document will be reviewed with. - * - * Generated from protobuf field string human_review_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $human_review_config = ''; - /** - * Whether the validation should be performed on the ad-hoc review request. - * - * Generated from protobuf field bool enable_schema_validation = 3; - */ - protected $enable_schema_validation = false; - /** - * The priority of the human review task. - * - * Generated from protobuf field .google.cloud.documentai.v1.ReviewDocumentRequest.Priority priority = 5; - */ - protected $priority = 0; - /** - * The document schema of the human review task. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema document_schema = 6; - */ - protected $document_schema = null; - protected $source; - - /** - * @param string $humanReviewConfig Required. The resource name of the - * [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the - * document will be reviewed with. Please see - * {@see DocumentProcessorServiceClient::humanReviewConfigName()} for help formatting this field. - * - * @return \Google\Cloud\DocumentAI\V1\ReviewDocumentRequest - * - * @experimental - */ - public static function build(string $humanReviewConfig): self - { - return (new self()) - ->setHumanReviewConfig($humanReviewConfig); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\Document $inline_document - * An inline document proto. - * @type string $human_review_config - * Required. The resource name of the - * [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the - * document will be reviewed with. - * @type bool $enable_schema_validation - * Whether the validation should be performed on the ad-hoc review request. - * @type int $priority - * The priority of the human review task. - * @type \Google\Cloud\DocumentAI\V1\DocumentSchema $document_schema - * The document schema of the human review task. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * An inline document proto. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document inline_document = 4; - * @return \Google\Cloud\DocumentAI\V1\Document|null - */ - public function getInlineDocument() - { - return $this->readOneof(4); - } - - public function hasInlineDocument() - { - return $this->hasOneof(4); - } - - /** - * An inline document proto. - * - * Generated from protobuf field .google.cloud.documentai.v1.Document inline_document = 4; - * @param \Google\Cloud\DocumentAI\V1\Document $var - * @return $this - */ - public function setInlineDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Document::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Required. The resource name of the - * [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the - * document will be reviewed with. - * - * Generated from protobuf field string human_review_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getHumanReviewConfig() - { - return $this->human_review_config; - } - - /** - * Required. The resource name of the - * [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the - * document will be reviewed with. - * - * Generated from protobuf field string human_review_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setHumanReviewConfig($var) - { - GPBUtil::checkString($var, True); - $this->human_review_config = $var; - - return $this; - } - - /** - * Whether the validation should be performed on the ad-hoc review request. - * - * Generated from protobuf field bool enable_schema_validation = 3; - * @return bool - */ - public function getEnableSchemaValidation() - { - return $this->enable_schema_validation; - } - - /** - * Whether the validation should be performed on the ad-hoc review request. - * - * Generated from protobuf field bool enable_schema_validation = 3; - * @param bool $var - * @return $this - */ - public function setEnableSchemaValidation($var) - { - GPBUtil::checkBool($var); - $this->enable_schema_validation = $var; - - return $this; - } - - /** - * The priority of the human review task. - * - * Generated from protobuf field .google.cloud.documentai.v1.ReviewDocumentRequest.Priority priority = 5; - * @return int - */ - public function getPriority() - { - return $this->priority; - } - - /** - * The priority of the human review task. - * - * Generated from protobuf field .google.cloud.documentai.v1.ReviewDocumentRequest.Priority priority = 5; - * @param int $var - * @return $this - */ - public function setPriority($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\ReviewDocumentRequest\Priority::class); - $this->priority = $var; - - return $this; - } - - /** - * The document schema of the human review task. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema document_schema = 6; - * @return \Google\Cloud\DocumentAI\V1\DocumentSchema|null - */ - public function getDocumentSchema() - { - return $this->document_schema; - } - - public function hasDocumentSchema() - { - return isset($this->document_schema); - } - - public function clearDocumentSchema() - { - unset($this->document_schema); - } - - /** - * The document schema of the human review task. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema document_schema = 6; - * @param \Google\Cloud\DocumentAI\V1\DocumentSchema $var - * @return $this - */ - public function setDocumentSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\DocumentSchema::class); - $this->document_schema = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentRequest/Priority.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentRequest/Priority.php deleted file mode 100644 index 4cfade81b71a..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentRequest/Priority.php +++ /dev/null @@ -1,59 +0,0 @@ -google.cloud.documentai.v1.ReviewDocumentRequest.Priority - */ -class Priority -{ - /** - * The default priority level. - * - * Generated from protobuf enum DEFAULT = 0; - */ - const PBDEFAULT = 0; - /** - * The urgent priority level. The labeling manager should allocate labeler - * resource to the urgent task queue to respect this priority level. - * - * Generated from protobuf enum URGENT = 1; - */ - const URGENT = 1; - - private static $valueToName = [ - self::PBDEFAULT => 'DEFAULT', - self::URGENT => 'URGENT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentResponse.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentResponse.php deleted file mode 100644 index 70f2081d7188..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentResponse.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.documentai.v1.ReviewDocumentResponse - */ -class ReviewDocumentResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The Cloud Storage uri for the human reviewed document if the review is - * succeeded. - * - * Generated from protobuf field string gcs_destination = 1; - */ - protected $gcs_destination = ''; - /** - * The state of the review operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.ReviewDocumentResponse.State state = 2; - */ - protected $state = 0; - /** - * The reason why the review is rejected by reviewer. - * - * Generated from protobuf field string rejection_reason = 3; - */ - protected $rejection_reason = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $gcs_destination - * The Cloud Storage uri for the human reviewed document if the review is - * succeeded. - * @type int $state - * The state of the review operation. - * @type string $rejection_reason - * The reason why the review is rejected by reviewer. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * The Cloud Storage uri for the human reviewed document if the review is - * succeeded. - * - * Generated from protobuf field string gcs_destination = 1; - * @return string - */ - public function getGcsDestination() - { - return $this->gcs_destination; - } - - /** - * The Cloud Storage uri for the human reviewed document if the review is - * succeeded. - * - * Generated from protobuf field string gcs_destination = 1; - * @param string $var - * @return $this - */ - public function setGcsDestination($var) - { - GPBUtil::checkString($var, True); - $this->gcs_destination = $var; - - return $this; - } - - /** - * The state of the review operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.ReviewDocumentResponse.State state = 2; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of the review operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.ReviewDocumentResponse.State state = 2; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\ReviewDocumentResponse\State::class); - $this->state = $var; - - return $this; - } - - /** - * The reason why the review is rejected by reviewer. - * - * Generated from protobuf field string rejection_reason = 3; - * @return string - */ - public function getRejectionReason() - { - return $this->rejection_reason; - } - - /** - * The reason why the review is rejected by reviewer. - * - * Generated from protobuf field string rejection_reason = 3; - * @param string $var - * @return $this - */ - public function setRejectionReason($var) - { - GPBUtil::checkString($var, True); - $this->rejection_reason = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentResponse/State.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentResponse/State.php deleted file mode 100644 index 7ade2c2dbe40..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/ReviewDocumentResponse/State.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.documentai.v1.ReviewDocumentResponse.State - */ -class State -{ - /** - * The default value. This value is used if the state is omitted. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The review operation is rejected by the reviewer. - * - * Generated from protobuf enum REJECTED = 1; - */ - const REJECTED = 1; - /** - * The review operation is succeeded. - * - * Generated from protobuf enum SUCCEEDED = 2; - */ - const SUCCEEDED = 2; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::REJECTED => 'REJECTED', - self::SUCCEEDED => 'SUCCEEDED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/SetDefaultProcessorVersionMetadata.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/SetDefaultProcessorVersionMetadata.php deleted file mode 100644 index 0165f85a42b7..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/SetDefaultProcessorVersionMetadata.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.documentai.v1.SetDefaultProcessorVersionMetadata - */ -class SetDefaultProcessorVersionMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The basic metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; - */ - protected $common_metadata = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $common_metadata - * The basic metadata of the long-running operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * The basic metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; - * @return \Google\Cloud\DocumentAI\V1\CommonOperationMetadata|null - */ - public function getCommonMetadata() - { - return $this->common_metadata; - } - - public function hasCommonMetadata() - { - return isset($this->common_metadata); - } - - public function clearCommonMetadata() - { - unset($this->common_metadata); - } - - /** - * The basic metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; - * @param \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $var - * @return $this - */ - public function setCommonMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\CommonOperationMetadata::class); - $this->common_metadata = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/SetDefaultProcessorVersionRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/SetDefaultProcessorVersionRequest.php deleted file mode 100644 index 4338a9d93477..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/SetDefaultProcessorVersionRequest.php +++ /dev/null @@ -1,123 +0,0 @@ -google.cloud.documentai.v1.SetDefaultProcessorVersionRequest - */ -class SetDefaultProcessorVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] to change default - * version. - * - * Generated from protobuf field string processor = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $processor = ''; - /** - * Required. The resource name of child - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as - * default. Format: - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}` - * - * Generated from protobuf field string default_processor_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $default_processor_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $processor - * Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] to change default - * version. - * @type string $default_processor_version - * Required. The resource name of child - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as - * default. Format: - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] to change default - * version. - * - * Generated from protobuf field string processor = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getProcessor() - { - return $this->processor; - } - - /** - * Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] to change default - * version. - * - * Generated from protobuf field string processor = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setProcessor($var) - { - GPBUtil::checkString($var, True); - $this->processor = $var; - - return $this; - } - - /** - * Required. The resource name of child - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as - * default. Format: - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}` - * - * Generated from protobuf field string default_processor_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getDefaultProcessorVersion() - { - return $this->default_processor_version; - } - - /** - * Required. The resource name of child - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as - * default. Format: - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}` - * - * Generated from protobuf field string default_processor_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDefaultProcessorVersion($var) - { - GPBUtil::checkString($var, True); - $this->default_processor_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/SetDefaultProcessorVersionResponse.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/SetDefaultProcessorVersionResponse.php deleted file mode 100644 index 642596b1ce81..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/SetDefaultProcessorVersionResponse.php +++ /dev/null @@ -1,35 +0,0 @@ -google.cloud.documentai.v1.SetDefaultProcessorVersionResponse - */ -class SetDefaultProcessorVersionResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionMetadata.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionMetadata.php deleted file mode 100644 index 9ab3e8e3aef6..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionMetadata.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.documentai.v1.TrainProcessorVersionMetadata - */ -class TrainProcessorVersionMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The basic metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; - */ - protected $common_metadata = null; - /** - * The training dataset validation information. - * - * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation training_dataset_validation = 2; - */ - protected $training_dataset_validation = null; - /** - * The test dataset validation information. - * - * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation test_dataset_validation = 3; - */ - protected $test_dataset_validation = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $common_metadata - * The basic metadata of the long-running operation. - * @type \Google\Cloud\DocumentAI\V1\TrainProcessorVersionMetadata\DatasetValidation $training_dataset_validation - * The training dataset validation information. - * @type \Google\Cloud\DocumentAI\V1\TrainProcessorVersionMetadata\DatasetValidation $test_dataset_validation - * The test dataset validation information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * The basic metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; - * @return \Google\Cloud\DocumentAI\V1\CommonOperationMetadata|null - */ - public function getCommonMetadata() - { - return $this->common_metadata; - } - - public function hasCommonMetadata() - { - return isset($this->common_metadata); - } - - public function clearCommonMetadata() - { - unset($this->common_metadata); - } - - /** - * The basic metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; - * @param \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $var - * @return $this - */ - public function setCommonMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\CommonOperationMetadata::class); - $this->common_metadata = $var; - - return $this; - } - - /** - * The training dataset validation information. - * - * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation training_dataset_validation = 2; - * @return \Google\Cloud\DocumentAI\V1\TrainProcessorVersionMetadata\DatasetValidation|null - */ - public function getTrainingDatasetValidation() - { - return $this->training_dataset_validation; - } - - public function hasTrainingDatasetValidation() - { - return isset($this->training_dataset_validation); - } - - public function clearTrainingDatasetValidation() - { - unset($this->training_dataset_validation); - } - - /** - * The training dataset validation information. - * - * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation training_dataset_validation = 2; - * @param \Google\Cloud\DocumentAI\V1\TrainProcessorVersionMetadata\DatasetValidation $var - * @return $this - */ - public function setTrainingDatasetValidation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\TrainProcessorVersionMetadata\DatasetValidation::class); - $this->training_dataset_validation = $var; - - return $this; - } - - /** - * The test dataset validation information. - * - * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation test_dataset_validation = 3; - * @return \Google\Cloud\DocumentAI\V1\TrainProcessorVersionMetadata\DatasetValidation|null - */ - public function getTestDatasetValidation() - { - return $this->test_dataset_validation; - } - - public function hasTestDatasetValidation() - { - return isset($this->test_dataset_validation); - } - - public function clearTestDatasetValidation() - { - unset($this->test_dataset_validation); - } - - /** - * The test dataset validation information. - * - * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation test_dataset_validation = 3; - * @param \Google\Cloud\DocumentAI\V1\TrainProcessorVersionMetadata\DatasetValidation $var - * @return $this - */ - public function setTestDatasetValidation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\TrainProcessorVersionMetadata\DatasetValidation::class); - $this->test_dataset_validation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionMetadata/DatasetValidation.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionMetadata/DatasetValidation.php deleted file mode 100644 index 9faed1415e3c..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionMetadata/DatasetValidation.php +++ /dev/null @@ -1,186 +0,0 @@ -google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation - */ -class DatasetValidation extends \Google\Protobuf\Internal\Message -{ - /** - * The total number of document errors. - * - * Generated from protobuf field int32 document_error_count = 3; - */ - protected $document_error_count = 0; - /** - * The total number of dataset errors. - * - * Generated from protobuf field int32 dataset_error_count = 4; - */ - protected $dataset_error_count = 0; - /** - * Error information pertaining to specific documents. A maximum of 10 - * document errors will be returned. - * Any document with errors will not be used throughout training. - * - * Generated from protobuf field repeated .google.rpc.Status document_errors = 1; - */ - private $document_errors; - /** - * Error information for the dataset as a whole. A maximum of 10 dataset - * errors will be returned. - * A single dataset error is terminal for training. - * - * Generated from protobuf field repeated .google.rpc.Status dataset_errors = 2; - */ - private $dataset_errors; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $document_error_count - * The total number of document errors. - * @type int $dataset_error_count - * The total number of dataset errors. - * @type \Google\Rpc\Status[] $document_errors - * Error information pertaining to specific documents. A maximum of 10 - * document errors will be returned. - * Any document with errors will not be used throughout training. - * @type \Google\Rpc\Status[] $dataset_errors - * Error information for the dataset as a whole. A maximum of 10 dataset - * errors will be returned. - * A single dataset error is terminal for training. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * The total number of document errors. - * - * Generated from protobuf field int32 document_error_count = 3; - * @return int - */ - public function getDocumentErrorCount() - { - return $this->document_error_count; - } - - /** - * The total number of document errors. - * - * Generated from protobuf field int32 document_error_count = 3; - * @param int $var - * @return $this - */ - public function setDocumentErrorCount($var) - { - GPBUtil::checkInt32($var); - $this->document_error_count = $var; - - return $this; - } - - /** - * The total number of dataset errors. - * - * Generated from protobuf field int32 dataset_error_count = 4; - * @return int - */ - public function getDatasetErrorCount() - { - return $this->dataset_error_count; - } - - /** - * The total number of dataset errors. - * - * Generated from protobuf field int32 dataset_error_count = 4; - * @param int $var - * @return $this - */ - public function setDatasetErrorCount($var) - { - GPBUtil::checkInt32($var); - $this->dataset_error_count = $var; - - return $this; - } - - /** - * Error information pertaining to specific documents. A maximum of 10 - * document errors will be returned. - * Any document with errors will not be used throughout training. - * - * Generated from protobuf field repeated .google.rpc.Status document_errors = 1; - * @return RepeatedField<\Google\Rpc\Status> - */ - public function getDocumentErrors() - { - return $this->document_errors; - } - - /** - * Error information pertaining to specific documents. A maximum of 10 - * document errors will be returned. - * Any document with errors will not be used throughout training. - * - * Generated from protobuf field repeated .google.rpc.Status document_errors = 1; - * @param \Google\Rpc\Status[] $var - * @return $this - */ - public function setDocumentErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); - $this->document_errors = $arr; - - return $this; - } - - /** - * Error information for the dataset as a whole. A maximum of 10 dataset - * errors will be returned. - * A single dataset error is terminal for training. - * - * Generated from protobuf field repeated .google.rpc.Status dataset_errors = 2; - * @return RepeatedField<\Google\Rpc\Status> - */ - public function getDatasetErrors() - { - return $this->dataset_errors; - } - - /** - * Error information for the dataset as a whole. A maximum of 10 dataset - * errors will be returned. - * A single dataset error is terminal for training. - * - * Generated from protobuf field repeated .google.rpc.Status dataset_errors = 2; - * @param \Google\Rpc\Status[] $var - * @return $this - */ - public function setDatasetErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); - $this->dataset_errors = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest.php deleted file mode 100644 index 67b7a5735ca1..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest.php +++ /dev/null @@ -1,348 +0,0 @@ -google.cloud.documentai.v1.TrainProcessorVersionRequest - */ -class TrainProcessorVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent (project, location and processor) to create the new - * version for. Format: - * `projects/{project}/locations/{location}/processors/{processor}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The processor version to be created. - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion processor_version = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $processor_version = null; - /** - * Optional. The schema the processor version will be trained with. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema document_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $document_schema = null; - /** - * Optional. The input data used to train the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. - * - * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $input_data = null; - /** - * Optional. The processor version to use as a base for training. This - * processor version must be a child of `parent`. Format: - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`. - * - * Generated from protobuf field string base_processor_version = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $base_processor_version = ''; - protected $processor_flags; - - /** - * @param string $parent Required. The parent (project, location and processor) to create the new - * version for. Format: - * `projects/{project}/locations/{location}/processors/{processor}`. Please see - * {@see DocumentProcessorServiceClient::processorName()} for help formatting this field. - * @param \Google\Cloud\DocumentAI\V1\ProcessorVersion $processorVersion Required. The processor version to be created. - * - * @return \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\DocumentAI\V1\ProcessorVersion $processorVersion): self - { - return (new self()) - ->setParent($parent) - ->setProcessorVersion($processorVersion); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\CustomDocumentExtractionOptions $custom_document_extraction_options - * Options to control Custom Document Extraction (CDE) Processor. - * @type \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\FoundationModelTuningOptions $foundation_model_tuning_options - * Options to control foundation model tuning of a processor. - * @type string $parent - * Required. The parent (project, location and processor) to create the new - * version for. Format: - * `projects/{project}/locations/{location}/processors/{processor}`. - * @type \Google\Cloud\DocumentAI\V1\ProcessorVersion $processor_version - * Required. The processor version to be created. - * @type \Google\Cloud\DocumentAI\V1\DocumentSchema $document_schema - * Optional. The schema the processor version will be trained with. - * @type \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\InputData $input_data - * Optional. The input data used to train the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. - * @type string $base_processor_version - * Optional. The processor version to use as a base for training. This - * processor version must be a child of `parent`. Format: - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * Options to control Custom Document Extraction (CDE) Processor. - * - * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions custom_document_extraction_options = 5; - * @return \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\CustomDocumentExtractionOptions|null - */ - public function getCustomDocumentExtractionOptions() - { - return $this->readOneof(5); - } - - public function hasCustomDocumentExtractionOptions() - { - return $this->hasOneof(5); - } - - /** - * Options to control Custom Document Extraction (CDE) Processor. - * - * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions custom_document_extraction_options = 5; - * @param \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\CustomDocumentExtractionOptions $var - * @return $this - */ - public function setCustomDocumentExtractionOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\CustomDocumentExtractionOptions::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Options to control foundation model tuning of a processor. - * - * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.FoundationModelTuningOptions foundation_model_tuning_options = 12; - * @return \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\FoundationModelTuningOptions|null - */ - public function getFoundationModelTuningOptions() - { - return $this->readOneof(12); - } - - public function hasFoundationModelTuningOptions() - { - return $this->hasOneof(12); - } - - /** - * Options to control foundation model tuning of a processor. - * - * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.FoundationModelTuningOptions foundation_model_tuning_options = 12; - * @param \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\FoundationModelTuningOptions $var - * @return $this - */ - public function setFoundationModelTuningOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\FoundationModelTuningOptions::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Required. The parent (project, location and processor) to create the new - * version for. Format: - * `projects/{project}/locations/{location}/processors/{processor}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent (project, location and processor) to create the new - * version for. Format: - * `projects/{project}/locations/{location}/processors/{processor}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The processor version to be created. - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion processor_version = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DocumentAI\V1\ProcessorVersion|null - */ - public function getProcessorVersion() - { - return $this->processor_version; - } - - public function hasProcessorVersion() - { - return isset($this->processor_version); - } - - public function clearProcessorVersion() - { - unset($this->processor_version); - } - - /** - * Required. The processor version to be created. - * - * Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion processor_version = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DocumentAI\V1\ProcessorVersion $var - * @return $this - */ - public function setProcessorVersion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\ProcessorVersion::class); - $this->processor_version = $var; - - return $this; - } - - /** - * Optional. The schema the processor version will be trained with. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema document_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\DocumentAI\V1\DocumentSchema|null - */ - public function getDocumentSchema() - { - return $this->document_schema; - } - - public function hasDocumentSchema() - { - return isset($this->document_schema); - } - - public function clearDocumentSchema() - { - unset($this->document_schema); - } - - /** - * Optional. The schema the processor version will be trained with. - * - * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema document_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\DocumentAI\V1\DocumentSchema $var - * @return $this - */ - public function setDocumentSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\DocumentSchema::class); - $this->document_schema = $var; - - return $this; - } - - /** - * Optional. The input data used to train the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. - * - * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\InputData|null - */ - public function getInputData() - { - return $this->input_data; - } - - public function hasInputData() - { - return isset($this->input_data); - } - - public function clearInputData() - { - unset($this->input_data); - } - - /** - * Optional. The input data used to train the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. - * - * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\InputData $var - * @return $this - */ - public function setInputData($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\InputData::class); - $this->input_data = $var; - - return $this; - } - - /** - * Optional. The processor version to use as a base for training. This - * processor version must be a child of `parent`. Format: - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`. - * - * Generated from protobuf field string base_processor_version = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getBaseProcessorVersion() - { - return $this->base_processor_version; - } - - /** - * Optional. The processor version to use as a base for training. This - * processor version must be a child of `parent`. Format: - * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`. - * - * Generated from protobuf field string base_processor_version = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setBaseProcessorVersion($var) - { - GPBUtil::checkString($var, True); - $this->base_processor_version = $var; - - return $this; - } - - /** - * @return string - */ - public function getProcessorFlags() - { - return $this->whichOneof("processor_flags"); - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/CustomDocumentExtractionOptions.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/CustomDocumentExtractionOptions.php deleted file mode 100644 index f139d14ab13b..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/CustomDocumentExtractionOptions.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions - */ -class CustomDocumentExtractionOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Training method to use for CDE training. - * - * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions.TrainingMethod training_method = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $training_method = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $training_method - * Optional. Training method to use for CDE training. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Training method to use for CDE training. - * - * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions.TrainingMethod training_method = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getTrainingMethod() - { - return $this->training_method; - } - - /** - * Optional. Training method to use for CDE training. - * - * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions.TrainingMethod training_method = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setTrainingMethod($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\CustomDocumentExtractionOptions\TrainingMethod::class); - $this->training_method = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/CustomDocumentExtractionOptions/TrainingMethod.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/CustomDocumentExtractionOptions/TrainingMethod.php deleted file mode 100644 index fb24b9210ca5..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/CustomDocumentExtractionOptions/TrainingMethod.php +++ /dev/null @@ -1,56 +0,0 @@ -google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions.TrainingMethod - */ -class TrainingMethod -{ - /** - * Generated from protobuf enum TRAINING_METHOD_UNSPECIFIED = 0; - */ - const TRAINING_METHOD_UNSPECIFIED = 0; - /** - * Generated from protobuf enum MODEL_BASED = 1; - */ - const MODEL_BASED = 1; - /** - * Generated from protobuf enum TEMPLATE_BASED = 2; - */ - const TEMPLATE_BASED = 2; - - private static $valueToName = [ - self::TRAINING_METHOD_UNSPECIFIED => 'TRAINING_METHOD_UNSPECIFIED', - self::MODEL_BASED => 'MODEL_BASED', - self::TEMPLATE_BASED => 'TEMPLATE_BASED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/FoundationModelTuningOptions.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/FoundationModelTuningOptions.php deleted file mode 100644 index 3de51e676c4a..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/FoundationModelTuningOptions.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.documentai.v1.TrainProcessorVersionRequest.FoundationModelTuningOptions - */ -class FoundationModelTuningOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The number of steps to run for model tuning. Valid values are - * between 1 and 400. If not provided, recommended steps will be used. - * - * Generated from protobuf field int32 train_steps = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $train_steps = 0; - /** - * Optional. The multiplier to apply to the recommended learning rate. Valid - * values are between 0.1 and 10. If not provided, recommended learning rate - * will be used. - * - * Generated from protobuf field float learning_rate_multiplier = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $learning_rate_multiplier = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $train_steps - * Optional. The number of steps to run for model tuning. Valid values are - * between 1 and 400. If not provided, recommended steps will be used. - * @type float $learning_rate_multiplier - * Optional. The multiplier to apply to the recommended learning rate. Valid - * values are between 0.1 and 10. If not provided, recommended learning rate - * will be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The number of steps to run for model tuning. Valid values are - * between 1 and 400. If not provided, recommended steps will be used. - * - * Generated from protobuf field int32 train_steps = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getTrainSteps() - { - return $this->train_steps; - } - - /** - * Optional. The number of steps to run for model tuning. Valid values are - * between 1 and 400. If not provided, recommended steps will be used. - * - * Generated from protobuf field int32 train_steps = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setTrainSteps($var) - { - GPBUtil::checkInt32($var); - $this->train_steps = $var; - - return $this; - } - - /** - * Optional. The multiplier to apply to the recommended learning rate. Valid - * values are between 0.1 and 10. If not provided, recommended learning rate - * will be used. - * - * Generated from protobuf field float learning_rate_multiplier = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getLearningRateMultiplier() - { - return $this->learning_rate_multiplier; - } - - /** - * Optional. The multiplier to apply to the recommended learning rate. Valid - * values are between 0.1 and 10. If not provided, recommended learning rate - * will be used. - * - * Generated from protobuf field float learning_rate_multiplier = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setLearningRateMultiplier($var) - { - GPBUtil::checkFloat($var); - $this->learning_rate_multiplier = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/InputData.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/InputData.php deleted file mode 100644 index 3a05f4d06602..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionRequest/InputData.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData - */ -class InputData extends \Google\Protobuf\Internal\Message -{ - /** - * The documents used for training the new version. - * - * Generated from protobuf field .google.cloud.documentai.v1.BatchDocumentsInputConfig training_documents = 3; - */ - protected $training_documents = null; - /** - * The documents used for testing the trained version. - * - * Generated from protobuf field .google.cloud.documentai.v1.BatchDocumentsInputConfig test_documents = 4; - */ - protected $test_documents = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig $training_documents - * The documents used for training the new version. - * @type \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig $test_documents - * The documents used for testing the trained version. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * The documents used for training the new version. - * - * Generated from protobuf field .google.cloud.documentai.v1.BatchDocumentsInputConfig training_documents = 3; - * @return \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig|null - */ - public function getTrainingDocuments() - { - return $this->training_documents; - } - - public function hasTrainingDocuments() - { - return isset($this->training_documents); - } - - public function clearTrainingDocuments() - { - unset($this->training_documents); - } - - /** - * The documents used for training the new version. - * - * Generated from protobuf field .google.cloud.documentai.v1.BatchDocumentsInputConfig training_documents = 3; - * @param \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig $var - * @return $this - */ - public function setTrainingDocuments($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig::class); - $this->training_documents = $var; - - return $this; - } - - /** - * The documents used for testing the trained version. - * - * Generated from protobuf field .google.cloud.documentai.v1.BatchDocumentsInputConfig test_documents = 4; - * @return \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig|null - */ - public function getTestDocuments() - { - return $this->test_documents; - } - - public function hasTestDocuments() - { - return isset($this->test_documents); - } - - public function clearTestDocuments() - { - unset($this->test_documents); - } - - /** - * The documents used for testing the trained version. - * - * Generated from protobuf field .google.cloud.documentai.v1.BatchDocumentsInputConfig test_documents = 4; - * @param \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig $var - * @return $this - */ - public function setTestDocuments($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig::class); - $this->test_documents = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionResponse.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionResponse.php deleted file mode 100644 index 628a57ae7aa4..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/TrainProcessorVersionResponse.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.documentai.v1.TrainProcessorVersionResponse - */ -class TrainProcessorVersionResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the processor version produced by training. - * - * Generated from protobuf field string processor_version = 1; - */ - protected $processor_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $processor_version - * The resource name of the processor version produced by training. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the processor version produced by training. - * - * Generated from protobuf field string processor_version = 1; - * @return string - */ - public function getProcessorVersion() - { - return $this->processor_version; - } - - /** - * The resource name of the processor version produced by training. - * - * Generated from protobuf field string processor_version = 1; - * @param string $var - * @return $this - */ - public function setProcessorVersion($var) - { - GPBUtil::checkString($var, True); - $this->processor_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/UndeployProcessorVersionMetadata.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/UndeployProcessorVersionMetadata.php deleted file mode 100644 index 4195aafdb4c4..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/UndeployProcessorVersionMetadata.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.documentai.v1.UndeployProcessorVersionMetadata - */ -class UndeployProcessorVersionMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The basic metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; - */ - protected $common_metadata = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $common_metadata - * The basic metadata of the long-running operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * The basic metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; - * @return \Google\Cloud\DocumentAI\V1\CommonOperationMetadata|null - */ - public function getCommonMetadata() - { - return $this->common_metadata; - } - - public function hasCommonMetadata() - { - return isset($this->common_metadata); - } - - public function clearCommonMetadata() - { - unset($this->common_metadata); - } - - /** - * The basic metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.documentai.v1.CommonOperationMetadata common_metadata = 1; - * @param \Google\Cloud\DocumentAI\V1\CommonOperationMetadata $var - * @return $this - */ - public function setCommonMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\CommonOperationMetadata::class); - $this->common_metadata = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/UndeployProcessorVersionRequest.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/UndeployProcessorVersionRequest.php deleted file mode 100644 index 7bce922ac002..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/UndeployProcessorVersionRequest.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.documentai.v1.UndeployProcessorVersionRequest - */ -class UndeployProcessorVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The processor version resource name to be undeployed. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The processor version resource name to be undeployed. Please see - * {@see DocumentProcessorServiceClient::processorVersionName()} for help formatting this field. - * - * @return \Google\Cloud\DocumentAI\V1\UndeployProcessorVersionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The processor version resource name to be undeployed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The processor version resource name to be undeployed. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The processor version resource name to be undeployed. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/UndeployProcessorVersionResponse.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/UndeployProcessorVersionResponse.php deleted file mode 100644 index 4d2bf8fb8f95..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/UndeployProcessorVersionResponse.php +++ /dev/null @@ -1,35 +0,0 @@ -google.cloud.documentai.v1.UndeployProcessorVersionResponse - */ -class UndeployProcessorVersionResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Vertex.php b/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Vertex.php deleted file mode 100644 index a9387c48fb1d..000000000000 --- a/owl-bot-staging/DocumentAi/v1/proto/src/Google/Cloud/DocumentAI/V1/Vertex.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.documentai.v1.Vertex - */ -class Vertex extends \Google\Protobuf\Internal\Message -{ - /** - * X coordinate. - * - * Generated from protobuf field int32 x = 1; - */ - protected $x = 0; - /** - * Y coordinate (starts from the top of the image). - * - * Generated from protobuf field int32 y = 2; - */ - protected $y = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $x - * X coordinate. - * @type int $y - * Y coordinate (starts from the top of the image). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Documentai\V1\Geometry::initOnce(); - parent::__construct($data); - } - - /** - * X coordinate. - * - * Generated from protobuf field int32 x = 1; - * @return int - */ - public function getX() - { - return $this->x; - } - - /** - * X coordinate. - * - * Generated from protobuf field int32 x = 1; - * @param int $var - * @return $this - */ - public function setX($var) - { - GPBUtil::checkInt32($var); - $this->x = $var; - - return $this; - } - - /** - * Y coordinate (starts from the top of the image). - * - * Generated from protobuf field int32 y = 2; - * @return int - */ - public function getY() - { - return $this->y; - } - - /** - * Y coordinate (starts from the top of the image). - * - * Generated from protobuf field int32 y = 2; - * @param int $var - * @return $this - */ - public function setY($var) - { - GPBUtil::checkInt32($var); - $this->y = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/batch_process_documents.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/batch_process_documents.php deleted file mode 100644 index 58507a4e5a90..000000000000 --- a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/batch_process_documents.php +++ /dev/null @@ -1,88 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $documentProcessorServiceClient->batchProcessDocuments($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var BatchProcessResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - batch_process_documents_sample($name); -} -// [END documentai_v1_generated_DocumentProcessorService_BatchProcessDocuments_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/create_processor.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/create_processor.php deleted file mode 100644 index e0d182885ae9..000000000000 --- a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/create_processor.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent) - ->setProcessor($processor); - - // Call the API and handle any network failures. - try { - /** @var Processor $response */ - $response = $documentProcessorServiceClient->createProcessor($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DocumentProcessorServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - create_processor_sample($formattedParent); -} -// [END documentai_v1_generated_DocumentProcessorService_CreateProcessor_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/delete_processor.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/delete_processor.php deleted file mode 100644 index cab1519c2dc9..000000000000 --- a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/delete_processor.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $documentProcessorServiceClient->deleteProcessor($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DocumentProcessorServiceClient::processorName( - '[PROJECT]', - '[LOCATION]', - '[PROCESSOR]' - ); - - delete_processor_sample($formattedName); -} -// [END documentai_v1_generated_DocumentProcessorService_DeleteProcessor_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/delete_processor_version.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/delete_processor_version.php deleted file mode 100644 index cb5ae7c322ad..000000000000 --- a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/delete_processor_version.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $documentProcessorServiceClient->deleteProcessorVersion($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DocumentProcessorServiceClient::processorVersionName( - '[PROJECT]', - '[LOCATION]', - '[PROCESSOR]', - '[PROCESSOR_VERSION]' - ); - - delete_processor_version_sample($formattedName); -} -// [END documentai_v1_generated_DocumentProcessorService_DeleteProcessorVersion_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/deploy_processor_version.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/deploy_processor_version.php deleted file mode 100644 index 57b8e40f8544..000000000000 --- a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/deploy_processor_version.php +++ /dev/null @@ -1,88 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $documentProcessorServiceClient->deployProcessorVersion($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DeployProcessorVersionResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DocumentProcessorServiceClient::processorVersionName( - '[PROJECT]', - '[LOCATION]', - '[PROCESSOR]', - '[PROCESSOR_VERSION]' - ); - - deploy_processor_version_sample($formattedName); -} -// [END documentai_v1_generated_DocumentProcessorService_DeployProcessorVersion_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/disable_processor.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/disable_processor.php deleted file mode 100644 index 04cebfddfc15..000000000000 --- a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/disable_processor.php +++ /dev/null @@ -1,87 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $documentProcessorServiceClient->disableProcessor($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DisableProcessorResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DocumentProcessorServiceClient::processorName( - '[PROJECT]', - '[LOCATION]', - '[PROCESSOR]' - ); - - disable_processor_sample($formattedName); -} -// [END documentai_v1_generated_DocumentProcessorService_DisableProcessor_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/enable_processor.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/enable_processor.php deleted file mode 100644 index b371e96e54e2..000000000000 --- a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/enable_processor.php +++ /dev/null @@ -1,87 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $documentProcessorServiceClient->enableProcessor($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var EnableProcessorResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DocumentProcessorServiceClient::processorName( - '[PROJECT]', - '[LOCATION]', - '[PROCESSOR]' - ); - - enable_processor_sample($formattedName); -} -// [END documentai_v1_generated_DocumentProcessorService_EnableProcessor_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/evaluate_processor_version.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/evaluate_processor_version.php deleted file mode 100644 index 53bda33d1e8a..000000000000 --- a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/evaluate_processor_version.php +++ /dev/null @@ -1,92 +0,0 @@ -setProcessorVersion($formattedProcessorVersion); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $documentProcessorServiceClient->evaluateProcessorVersion($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var EvaluateProcessorVersionResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedProcessorVersion = DocumentProcessorServiceClient::processorVersionName( - '[PROJECT]', - '[LOCATION]', - '[PROCESSOR]', - '[PROCESSOR_VERSION]' - ); - - evaluate_processor_version_sample($formattedProcessorVersion); -} -// [END documentai_v1_generated_DocumentProcessorService_EvaluateProcessorVersion_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/fetch_processor_types.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/fetch_processor_types.php deleted file mode 100644 index 8a1c19c06876..000000000000 --- a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/fetch_processor_types.php +++ /dev/null @@ -1,74 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var FetchProcessorTypesResponse $response */ - $response = $documentProcessorServiceClient->fetchProcessorTypes($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DocumentProcessorServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - fetch_processor_types_sample($formattedParent); -} -// [END documentai_v1_generated_DocumentProcessorService_FetchProcessorTypes_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_evaluation.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_evaluation.php deleted file mode 100644 index 175385d1151e..000000000000 --- a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_evaluation.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Evaluation $response */ - $response = $documentProcessorServiceClient->getEvaluation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DocumentProcessorServiceClient::evaluationName( - '[PROJECT]', - '[LOCATION]', - '[PROCESSOR]', - '[PROCESSOR_VERSION]', - '[EVALUATION]' - ); - - get_evaluation_sample($formattedName); -} -// [END documentai_v1_generated_DocumentProcessorService_GetEvaluation_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_location.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_location.php deleted file mode 100644 index 41d29f8bc513..000000000000 --- a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END documentai_v1_generated_DocumentProcessorService_GetLocation_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_processor.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_processor.php deleted file mode 100644 index 644e5c9b1917..000000000000 --- a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_processor.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Processor $response */ - $response = $documentProcessorServiceClient->getProcessor($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DocumentProcessorServiceClient::processorName( - '[PROJECT]', - '[LOCATION]', - '[PROCESSOR]' - ); - - get_processor_sample($formattedName); -} -// [END documentai_v1_generated_DocumentProcessorService_GetProcessor_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_processor_type.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_processor_type.php deleted file mode 100644 index b040e2fcac4d..000000000000 --- a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_processor_type.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ProcessorType $response */ - $response = $documentProcessorServiceClient->getProcessorType($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DocumentProcessorServiceClient::processorTypeName( - '[PROJECT]', - '[LOCATION]', - '[PROCESSOR_TYPE]' - ); - - get_processor_type_sample($formattedName); -} -// [END documentai_v1_generated_DocumentProcessorService_GetProcessorType_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_processor_version.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_processor_version.php deleted file mode 100644 index 29fd9e7194c9..000000000000 --- a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/get_processor_version.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ProcessorVersion $response */ - $response = $documentProcessorServiceClient->getProcessorVersion($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DocumentProcessorServiceClient::processorVersionName( - '[PROJECT]', - '[LOCATION]', - '[PROCESSOR]', - '[PROCESSOR_VERSION]' - ); - - get_processor_version_sample($formattedName); -} -// [END documentai_v1_generated_DocumentProcessorService_GetProcessorVersion_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_evaluations.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_evaluations.php deleted file mode 100644 index db3f075b1fe5..000000000000 --- a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_evaluations.php +++ /dev/null @@ -1,84 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $documentProcessorServiceClient->listEvaluations($request); - - /** @var Evaluation $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DocumentProcessorServiceClient::processorVersionName( - '[PROJECT]', - '[LOCATION]', - '[PROCESSOR]', - '[PROCESSOR_VERSION]' - ); - - list_evaluations_sample($formattedParent); -} -// [END documentai_v1_generated_DocumentProcessorService_ListEvaluations_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_locations.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_locations.php deleted file mode 100644 index fa458750d39c..000000000000 --- a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END documentai_v1_generated_DocumentProcessorService_ListLocations_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_processor_types.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_processor_types.php deleted file mode 100644 index 3b2c170f5e49..000000000000 --- a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_processor_types.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $documentProcessorServiceClient->listProcessorTypes($request); - - /** @var ProcessorType $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DocumentProcessorServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_processor_types_sample($formattedParent); -} -// [END documentai_v1_generated_DocumentProcessorService_ListProcessorTypes_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_processor_versions.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_processor_versions.php deleted file mode 100644 index a7d3a94b13f3..000000000000 --- a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_processor_versions.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $documentProcessorServiceClient->listProcessorVersions($request); - - /** @var ProcessorVersion $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DocumentProcessorServiceClient::processorName( - '[PROJECT]', - '[LOCATION]', - '[PROCESSOR]' - ); - - list_processor_versions_sample($formattedParent); -} -// [END documentai_v1_generated_DocumentProcessorService_ListProcessorVersions_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_processors.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_processors.php deleted file mode 100644 index d1cace4df1de..000000000000 --- a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/list_processors.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $documentProcessorServiceClient->listProcessors($request); - - /** @var Processor $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DocumentProcessorServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_processors_sample($formattedParent); -} -// [END documentai_v1_generated_DocumentProcessorService_ListProcessors_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/process_document.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/process_document.php deleted file mode 100644 index af25f661244c..000000000000 --- a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/process_document.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var ProcessResponse $response */ - $response = $documentProcessorServiceClient->processDocument($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - process_document_sample($name); -} -// [END documentai_v1_generated_DocumentProcessorService_ProcessDocument_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/review_document.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/review_document.php deleted file mode 100644 index a07ae3fcfce0..000000000000 --- a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/review_document.php +++ /dev/null @@ -1,90 +0,0 @@ -setHumanReviewConfig($formattedHumanReviewConfig); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $documentProcessorServiceClient->reviewDocument($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ReviewDocumentResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedHumanReviewConfig = DocumentProcessorServiceClient::humanReviewConfigName( - '[PROJECT]', - '[LOCATION]', - '[PROCESSOR]' - ); - - review_document_sample($formattedHumanReviewConfig); -} -// [END documentai_v1_generated_DocumentProcessorService_ReviewDocument_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/set_default_processor_version.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/set_default_processor_version.php deleted file mode 100644 index ef3d6f72248c..000000000000 --- a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/set_default_processor_version.php +++ /dev/null @@ -1,107 +0,0 @@ -setProcessor($formattedProcessor) - ->setDefaultProcessorVersion($formattedDefaultProcessorVersion); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $documentProcessorServiceClient->setDefaultProcessorVersion($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var SetDefaultProcessorVersionResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedProcessor = DocumentProcessorServiceClient::processorName( - '[PROJECT]', - '[LOCATION]', - '[PROCESSOR]' - ); - $formattedDefaultProcessorVersion = DocumentProcessorServiceClient::processorVersionName( - '[PROJECT]', - '[LOCATION]', - '[PROCESSOR]', - '[PROCESSOR_VERSION]' - ); - - set_default_processor_version_sample($formattedProcessor, $formattedDefaultProcessorVersion); -} -// [END documentai_v1_generated_DocumentProcessorService_SetDefaultProcessorVersion_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/train_processor_version.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/train_processor_version.php deleted file mode 100644 index 0f1fdb0d692b..000000000000 --- a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/train_processor_version.php +++ /dev/null @@ -1,94 +0,0 @@ -setParent($formattedParent) - ->setProcessorVersion($processorVersion); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $documentProcessorServiceClient->trainProcessorVersion($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var TrainProcessorVersionResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DocumentProcessorServiceClient::processorName( - '[PROJECT]', - '[LOCATION]', - '[PROCESSOR]' - ); - - train_processor_version_sample($formattedParent); -} -// [END documentai_v1_generated_DocumentProcessorService_TrainProcessorVersion_sync] diff --git a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/undeploy_processor_version.php b/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/undeploy_processor_version.php deleted file mode 100644 index 1c19d8dda5cc..000000000000 --- a/owl-bot-staging/DocumentAi/v1/samples/V1/DocumentProcessorServiceClient/undeploy_processor_version.php +++ /dev/null @@ -1,88 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $documentProcessorServiceClient->undeployProcessorVersion($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var UndeployProcessorVersionResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DocumentProcessorServiceClient::processorVersionName( - '[PROJECT]', - '[LOCATION]', - '[PROCESSOR]', - '[PROCESSOR_VERSION]' - ); - - undeploy_processor_version_sample($formattedName); -} -// [END documentai_v1_generated_DocumentProcessorService_UndeployProcessorVersion_sync] diff --git a/owl-bot-staging/DocumentAi/v1/src/V1/Client/DocumentProcessorServiceClient.php b/owl-bot-staging/DocumentAi/v1/src/V1/Client/DocumentProcessorServiceClient.php deleted file mode 100644 index 20a75a903dd1..000000000000 --- a/owl-bot-staging/DocumentAi/v1/src/V1/Client/DocumentProcessorServiceClient.php +++ /dev/null @@ -1,1119 +0,0 @@ - batchProcessDocumentsAsync(BatchProcessRequest $request, array $optionalArgs = []) - * @method PromiseInterface createProcessorAsync(CreateProcessorRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteProcessorAsync(DeleteProcessorRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteProcessorVersionAsync(DeleteProcessorVersionRequest $request, array $optionalArgs = []) - * @method PromiseInterface deployProcessorVersionAsync(DeployProcessorVersionRequest $request, array $optionalArgs = []) - * @method PromiseInterface disableProcessorAsync(DisableProcessorRequest $request, array $optionalArgs = []) - * @method PromiseInterface enableProcessorAsync(EnableProcessorRequest $request, array $optionalArgs = []) - * @method PromiseInterface evaluateProcessorVersionAsync(EvaluateProcessorVersionRequest $request, array $optionalArgs = []) - * @method PromiseInterface fetchProcessorTypesAsync(FetchProcessorTypesRequest $request, array $optionalArgs = []) - * @method PromiseInterface getEvaluationAsync(GetEvaluationRequest $request, array $optionalArgs = []) - * @method PromiseInterface getProcessorAsync(GetProcessorRequest $request, array $optionalArgs = []) - * @method PromiseInterface getProcessorTypeAsync(GetProcessorTypeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getProcessorVersionAsync(GetProcessorVersionRequest $request, array $optionalArgs = []) - * @method PromiseInterface listEvaluationsAsync(ListEvaluationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listProcessorTypesAsync(ListProcessorTypesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listProcessorVersionsAsync(ListProcessorVersionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listProcessorsAsync(ListProcessorsRequest $request, array $optionalArgs = []) - * @method PromiseInterface processDocumentAsync(ProcessRequest $request, array $optionalArgs = []) - * @method PromiseInterface reviewDocumentAsync(ReviewDocumentRequest $request, array $optionalArgs = []) - * @method PromiseInterface setDefaultProcessorVersionAsync(SetDefaultProcessorVersionRequest $request, array $optionalArgs = []) - * @method PromiseInterface trainProcessorVersionAsync(TrainProcessorVersionRequest $request, array $optionalArgs = []) - * @method PromiseInterface undeployProcessorVersionAsync(UndeployProcessorVersionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class DocumentProcessorServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.documentai.v1.DocumentProcessorService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'documentai.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'documentai.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/document_processor_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/document_processor_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/document_processor_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/document_processor_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a evaluation - * resource. - * - * @param string $project - * @param string $location - * @param string $processor - * @param string $processorVersion - * @param string $evaluation - * - * @return string The formatted evaluation resource. - */ - public static function evaluationName(string $project, string $location, string $processor, string $processorVersion, string $evaluation): string - { - return self::getPathTemplate('evaluation')->render([ - 'project' => $project, - 'location' => $location, - 'processor' => $processor, - 'processor_version' => $processorVersion, - 'evaluation' => $evaluation, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * human_review_config resource. - * - * @param string $project - * @param string $location - * @param string $processor - * - * @return string The formatted human_review_config resource. - */ - public static function humanReviewConfigName(string $project, string $location, string $processor): string - { - return self::getPathTemplate('humanReviewConfig')->render([ - 'project' => $project, - 'location' => $location, - 'processor' => $processor, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a processor - * resource. - * - * @param string $project - * @param string $location - * @param string $processor - * - * @return string The formatted processor resource. - */ - public static function processorName(string $project, string $location, string $processor): string - { - return self::getPathTemplate('processor')->render([ - 'project' => $project, - 'location' => $location, - 'processor' => $processor, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * processor_type resource. - * - * @param string $project - * @param string $location - * @param string $processorType - * - * @return string The formatted processor_type resource. - */ - public static function processorTypeName(string $project, string $location, string $processorType): string - { - return self::getPathTemplate('processorType')->render([ - 'project' => $project, - 'location' => $location, - 'processor_type' => $processorType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * processor_version resource. - * - * @param string $project - * @param string $location - * @param string $processor - * @param string $processorVersion - * - * @return string The formatted processor_version resource. - */ - public static function processorVersionName(string $project, string $location, string $processor, string $processorVersion): string - { - return self::getPathTemplate('processorVersion')->render([ - 'project' => $project, - 'location' => $location, - 'processor' => $processor, - 'processor_version' => $processorVersion, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - evaluation: projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation} - * - humanReviewConfig: projects/{project}/locations/{location}/processors/{processor}/humanReviewConfig - * - location: projects/{project}/locations/{location} - * - processor: projects/{project}/locations/{location}/processors/{processor} - * - processorType: projects/{project}/locations/{location}/processorTypes/{processor_type} - * - processorVersion: projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'documentai.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\DocumentAI\V1\DocumentProcessorServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new DocumentProcessorServiceClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * LRO endpoint to batch process many documents. The output is written - * to Cloud Storage as JSON in the [Document] format. - * - * The async variant is - * {@see DocumentProcessorServiceClient::batchProcessDocumentsAsync()} . - * - * @example samples/V1/DocumentProcessorServiceClient/batch_process_documents.php - * - * @param BatchProcessRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function batchProcessDocuments(BatchProcessRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('BatchProcessDocuments', $request, $callOptions)->wait(); - } - - /** - * Creates a processor from the - * [ProcessorType][google.cloud.documentai.v1.ProcessorType] provided. The - * processor will be at `ENABLED` state by default after its creation. Note - * that this method requires the `documentai.processors.create` permission on - * the project, which is highly privileged. A user or service account with - * this permission can create new processors that can interact with any gcs - * bucket in your project. - * - * The async variant is - * {@see DocumentProcessorServiceClient::createProcessorAsync()} . - * - * @example samples/V1/DocumentProcessorServiceClient/create_processor.php - * - * @param CreateProcessorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Processor - * - * @throws ApiException Thrown if the API call fails. - */ - public function createProcessor(CreateProcessorRequest $request, array $callOptions = []): Processor - { - return $this->startApiCall('CreateProcessor', $request, $callOptions)->wait(); - } - - /** - * Deletes the processor, unloads all deployed model artifacts if it was - * enabled and then deletes all artifacts associated with this processor. - * - * The async variant is - * {@see DocumentProcessorServiceClient::deleteProcessorAsync()} . - * - * @example samples/V1/DocumentProcessorServiceClient/delete_processor.php - * - * @param DeleteProcessorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteProcessor(DeleteProcessorRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteProcessor', $request, $callOptions)->wait(); - } - - /** - * Deletes the processor version, all artifacts under the processor version - * will be deleted. - * - * The async variant is - * {@see DocumentProcessorServiceClient::deleteProcessorVersionAsync()} . - * - * @example samples/V1/DocumentProcessorServiceClient/delete_processor_version.php - * - * @param DeleteProcessorVersionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteProcessorVersion(DeleteProcessorVersionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteProcessorVersion', $request, $callOptions)->wait(); - } - - /** - * Deploys the processor version. - * - * The async variant is - * {@see DocumentProcessorServiceClient::deployProcessorVersionAsync()} . - * - * @example samples/V1/DocumentProcessorServiceClient/deploy_processor_version.php - * - * @param DeployProcessorVersionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deployProcessorVersion(DeployProcessorVersionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeployProcessorVersion', $request, $callOptions)->wait(); - } - - /** - * Disables a processor - * - * The async variant is - * {@see DocumentProcessorServiceClient::disableProcessorAsync()} . - * - * @example samples/V1/DocumentProcessorServiceClient/disable_processor.php - * - * @param DisableProcessorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function disableProcessor(DisableProcessorRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DisableProcessor', $request, $callOptions)->wait(); - } - - /** - * Enables a processor - * - * The async variant is - * {@see DocumentProcessorServiceClient::enableProcessorAsync()} . - * - * @example samples/V1/DocumentProcessorServiceClient/enable_processor.php - * - * @param EnableProcessorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function enableProcessor(EnableProcessorRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('EnableProcessor', $request, $callOptions)->wait(); - } - - /** - * Evaluates a ProcessorVersion against annotated documents, producing an - * Evaluation. - * - * The async variant is - * {@see DocumentProcessorServiceClient::evaluateProcessorVersionAsync()} . - * - * @example samples/V1/DocumentProcessorServiceClient/evaluate_processor_version.php - * - * @param EvaluateProcessorVersionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function evaluateProcessorVersion(EvaluateProcessorVersionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('EvaluateProcessorVersion', $request, $callOptions)->wait(); - } - - /** - * Fetches processor types. Note that we don't use - * [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes] - * here, because it isn't paginated. - * - * The async variant is - * {@see DocumentProcessorServiceClient::fetchProcessorTypesAsync()} . - * - * @example samples/V1/DocumentProcessorServiceClient/fetch_processor_types.php - * - * @param FetchProcessorTypesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return FetchProcessorTypesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function fetchProcessorTypes(FetchProcessorTypesRequest $request, array $callOptions = []): FetchProcessorTypesResponse - { - return $this->startApiCall('FetchProcessorTypes', $request, $callOptions)->wait(); - } - - /** - * Retrieves a specific evaluation. - * - * The async variant is {@see DocumentProcessorServiceClient::getEvaluationAsync()} - * . - * - * @example samples/V1/DocumentProcessorServiceClient/get_evaluation.php - * - * @param GetEvaluationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Evaluation - * - * @throws ApiException Thrown if the API call fails. - */ - public function getEvaluation(GetEvaluationRequest $request, array $callOptions = []): Evaluation - { - return $this->startApiCall('GetEvaluation', $request, $callOptions)->wait(); - } - - /** - * Gets a processor detail. - * - * The async variant is {@see DocumentProcessorServiceClient::getProcessorAsync()} - * . - * - * @example samples/V1/DocumentProcessorServiceClient/get_processor.php - * - * @param GetProcessorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Processor - * - * @throws ApiException Thrown if the API call fails. - */ - public function getProcessor(GetProcessorRequest $request, array $callOptions = []): Processor - { - return $this->startApiCall('GetProcessor', $request, $callOptions)->wait(); - } - - /** - * Gets a processor type detail. - * - * The async variant is - * {@see DocumentProcessorServiceClient::getProcessorTypeAsync()} . - * - * @example samples/V1/DocumentProcessorServiceClient/get_processor_type.php - * - * @param GetProcessorTypeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ProcessorType - * - * @throws ApiException Thrown if the API call fails. - */ - public function getProcessorType(GetProcessorTypeRequest $request, array $callOptions = []): ProcessorType - { - return $this->startApiCall('GetProcessorType', $request, $callOptions)->wait(); - } - - /** - * Gets a processor version detail. - * - * The async variant is - * {@see DocumentProcessorServiceClient::getProcessorVersionAsync()} . - * - * @example samples/V1/DocumentProcessorServiceClient/get_processor_version.php - * - * @param GetProcessorVersionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ProcessorVersion - * - * @throws ApiException Thrown if the API call fails. - */ - public function getProcessorVersion(GetProcessorVersionRequest $request, array $callOptions = []): ProcessorVersion - { - return $this->startApiCall('GetProcessorVersion', $request, $callOptions)->wait(); - } - - /** - * Retrieves a set of evaluations for a given processor version. - * - * The async variant is - * {@see DocumentProcessorServiceClient::listEvaluationsAsync()} . - * - * @example samples/V1/DocumentProcessorServiceClient/list_evaluations.php - * - * @param ListEvaluationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listEvaluations(ListEvaluationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListEvaluations', $request, $callOptions); - } - - /** - * Lists the processor types that exist. - * - * The async variant is - * {@see DocumentProcessorServiceClient::listProcessorTypesAsync()} . - * - * @example samples/V1/DocumentProcessorServiceClient/list_processor_types.php - * - * @param ListProcessorTypesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listProcessorTypes(ListProcessorTypesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListProcessorTypes', $request, $callOptions); - } - - /** - * Lists all versions of a processor. - * - * The async variant is - * {@see DocumentProcessorServiceClient::listProcessorVersionsAsync()} . - * - * @example samples/V1/DocumentProcessorServiceClient/list_processor_versions.php - * - * @param ListProcessorVersionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listProcessorVersions(ListProcessorVersionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListProcessorVersions', $request, $callOptions); - } - - /** - * Lists all processors which belong to this project. - * - * The async variant is - * {@see DocumentProcessorServiceClient::listProcessorsAsync()} . - * - * @example samples/V1/DocumentProcessorServiceClient/list_processors.php - * - * @param ListProcessorsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listProcessors(ListProcessorsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListProcessors', $request, $callOptions); - } - - /** - * Processes a single document. - * - * The async variant is - * {@see DocumentProcessorServiceClient::processDocumentAsync()} . - * - * @example samples/V1/DocumentProcessorServiceClient/process_document.php - * - * @param ProcessRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ProcessResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function processDocument(ProcessRequest $request, array $callOptions = []): ProcessResponse - { - return $this->startApiCall('ProcessDocument', $request, $callOptions)->wait(); - } - - /** - * Send a document for Human Review. The input document should be processed by - * the specified processor. - * - * The async variant is - * {@see DocumentProcessorServiceClient::reviewDocumentAsync()} . - * - * @example samples/V1/DocumentProcessorServiceClient/review_document.php - * - * @param ReviewDocumentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function reviewDocument(ReviewDocumentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ReviewDocument', $request, $callOptions)->wait(); - } - - /** - * Set the default (active) version of a - * [Processor][google.cloud.documentai.v1.Processor] that will be used in - * [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] - * and - * [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments]. - * - * The async variant is - * {@see DocumentProcessorServiceClient::setDefaultProcessorVersionAsync()} . - * - * @example samples/V1/DocumentProcessorServiceClient/set_default_processor_version.php - * - * @param SetDefaultProcessorVersionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function setDefaultProcessorVersion(SetDefaultProcessorVersionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('SetDefaultProcessorVersion', $request, $callOptions)->wait(); - } - - /** - * Trains a new processor version. - * Operation metadata is returned as - * [TrainProcessorVersionMetadata][google.cloud.documentai.v1.TrainProcessorVersionMetadata]. - * - * The async variant is - * {@see DocumentProcessorServiceClient::trainProcessorVersionAsync()} . - * - * @example samples/V1/DocumentProcessorServiceClient/train_processor_version.php - * - * @param TrainProcessorVersionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function trainProcessorVersion(TrainProcessorVersionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('TrainProcessorVersion', $request, $callOptions)->wait(); - } - - /** - * Undeploys the processor version. - * - * The async variant is - * {@see DocumentProcessorServiceClient::undeployProcessorVersionAsync()} . - * - * @example samples/V1/DocumentProcessorServiceClient/undeploy_processor_version.php - * - * @param UndeployProcessorVersionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function undeployProcessorVersion(UndeployProcessorVersionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UndeployProcessorVersion', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see DocumentProcessorServiceClient::getLocationAsync()} . - * - * @example samples/V1/DocumentProcessorServiceClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see DocumentProcessorServiceClient::listLocationsAsync()} - * . - * - * @example samples/V1/DocumentProcessorServiceClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/DocumentAi/v1/src/V1/gapic_metadata.json b/owl-bot-staging/DocumentAi/v1/src/V1/gapic_metadata.json deleted file mode 100644 index b6a28df90b49..000000000000 --- a/owl-bot-staging/DocumentAi/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.documentai.v1", - "libraryPackage": "Google\\Cloud\\DocumentAI\\V1", - "services": { - "DocumentProcessorService": { - "clients": { - "grpc": { - "libraryClient": "DocumentProcessorServiceGapicClient", - "rpcs": { - "BatchProcessDocuments": { - "methods": [ - "batchProcessDocuments" - ] - }, - "CreateProcessor": { - "methods": [ - "createProcessor" - ] - }, - "DeleteProcessor": { - "methods": [ - "deleteProcessor" - ] - }, - "DeleteProcessorVersion": { - "methods": [ - "deleteProcessorVersion" - ] - }, - "DeployProcessorVersion": { - "methods": [ - "deployProcessorVersion" - ] - }, - "DisableProcessor": { - "methods": [ - "disableProcessor" - ] - }, - "EnableProcessor": { - "methods": [ - "enableProcessor" - ] - }, - "EvaluateProcessorVersion": { - "methods": [ - "evaluateProcessorVersion" - ] - }, - "FetchProcessorTypes": { - "methods": [ - "fetchProcessorTypes" - ] - }, - "GetEvaluation": { - "methods": [ - "getEvaluation" - ] - }, - "GetProcessor": { - "methods": [ - "getProcessor" - ] - }, - "GetProcessorType": { - "methods": [ - "getProcessorType" - ] - }, - "GetProcessorVersion": { - "methods": [ - "getProcessorVersion" - ] - }, - "ListEvaluations": { - "methods": [ - "listEvaluations" - ] - }, - "ListProcessorTypes": { - "methods": [ - "listProcessorTypes" - ] - }, - "ListProcessorVersions": { - "methods": [ - "listProcessorVersions" - ] - }, - "ListProcessors": { - "methods": [ - "listProcessors" - ] - }, - "ProcessDocument": { - "methods": [ - "processDocument" - ] - }, - "ReviewDocument": { - "methods": [ - "reviewDocument" - ] - }, - "SetDefaultProcessorVersion": { - "methods": [ - "setDefaultProcessorVersion" - ] - }, - "TrainProcessorVersion": { - "methods": [ - "trainProcessorVersion" - ] - }, - "UndeployProcessorVersion": { - "methods": [ - "undeployProcessorVersion" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/DocumentAi/v1/src/V1/resources/document_processor_service_client_config.json b/owl-bot-staging/DocumentAi/v1/src/V1/resources/document_processor_service_client_config.json deleted file mode 100644 index d750f74493d7..000000000000 --- a/owl-bot-staging/DocumentAi/v1/src/V1/resources/document_processor_service_client_config.json +++ /dev/null @@ -1,169 +0,0 @@ -{ - "interfaces": { - "google.cloud.documentai.v1.DocumentProcessorService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE", - "RESOURCE_EXHAUSTED" - ], - "retry_policy_2_codes": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 9.0, - "max_retry_delay_millis": 90000, - "initial_rpc_timeout_millis": 300000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 300000, - "total_timeout_millis": 300000 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.5, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 120000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 120000, - "total_timeout_millis": 120000 - } - }, - "methods": { - "BatchProcessDocuments": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "CreateProcessor": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteProcessor": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteProcessorVersion": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeployProcessorVersion": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DisableProcessor": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "EnableProcessor": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "EvaluateProcessorVersion": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "FetchProcessorTypes": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetEvaluation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetProcessor": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetProcessorType": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetProcessorVersion": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListEvaluations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListProcessorTypes": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListProcessorVersions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListProcessors": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ProcessDocument": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ReviewDocument": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "SetDefaultProcessorVersion": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "TrainProcessorVersion": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UndeployProcessorVersion": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/DocumentAi/v1/src/V1/resources/document_processor_service_descriptor_config.php b/owl-bot-staging/DocumentAi/v1/src/V1/resources/document_processor_service_descriptor_config.php deleted file mode 100644 index c0fd1eaee274..000000000000 --- a/owl-bot-staging/DocumentAi/v1/src/V1/resources/document_processor_service_descriptor_config.php +++ /dev/null @@ -1,443 +0,0 @@ - [ - 'google.cloud.documentai.v1.DocumentProcessorService' => [ - 'BatchProcessDocuments' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\DocumentAI\V1\BatchProcessResponse', - 'metadataReturnType' => '\Google\Cloud\DocumentAI\V1\BatchProcessMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteProcessor' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\DocumentAI\V1\DeleteProcessorMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteProcessorVersion' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\DocumentAI\V1\DeleteProcessorVersionMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeployProcessorVersion' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\DocumentAI\V1\DeployProcessorVersionResponse', - 'metadataReturnType' => '\Google\Cloud\DocumentAI\V1\DeployProcessorVersionMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DisableProcessor' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\DocumentAI\V1\DisableProcessorResponse', - 'metadataReturnType' => '\Google\Cloud\DocumentAI\V1\DisableProcessorMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'EnableProcessor' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\DocumentAI\V1\EnableProcessorResponse', - 'metadataReturnType' => '\Google\Cloud\DocumentAI\V1\EnableProcessorMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'EvaluateProcessorVersion' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\DocumentAI\V1\EvaluateProcessorVersionResponse', - 'metadataReturnType' => '\Google\Cloud\DocumentAI\V1\EvaluateProcessorVersionMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'processor_version', - 'fieldAccessors' => [ - 'getProcessorVersion', - ], - ], - ], - ], - 'ReviewDocument' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\DocumentAI\V1\ReviewDocumentResponse', - 'metadataReturnType' => '\Google\Cloud\DocumentAI\V1\ReviewDocumentOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'human_review_config', - 'fieldAccessors' => [ - 'getHumanReviewConfig', - ], - ], - ], - ], - 'SetDefaultProcessorVersion' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\DocumentAI\V1\SetDefaultProcessorVersionResponse', - 'metadataReturnType' => '\Google\Cloud\DocumentAI\V1\SetDefaultProcessorVersionMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'processor', - 'fieldAccessors' => [ - 'getProcessor', - ], - ], - ], - ], - 'TrainProcessorVersion' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\DocumentAI\V1\TrainProcessorVersionResponse', - 'metadataReturnType' => '\Google\Cloud\DocumentAI\V1\TrainProcessorVersionMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UndeployProcessorVersion' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\DocumentAI\V1\UndeployProcessorVersionResponse', - 'metadataReturnType' => '\Google\Cloud\DocumentAI\V1\UndeployProcessorVersionMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateProcessor' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DocumentAI\V1\Processor', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'FetchProcessorTypes' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DocumentAI\V1\FetchProcessorTypesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetEvaluation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DocumentAI\V1\Evaluation', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetProcessor' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DocumentAI\V1\Processor', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetProcessorType' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DocumentAI\V1\ProcessorType', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetProcessorVersion' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DocumentAI\V1\ProcessorVersion', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListEvaluations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEvaluations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\DocumentAI\V1\ListEvaluationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListProcessorTypes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getProcessorTypes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\DocumentAI\V1\ListProcessorTypesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListProcessorVersions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getProcessorVersions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\DocumentAI\V1\ListProcessorVersionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListProcessors' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getProcessors', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\DocumentAI\V1\ListProcessorsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ProcessDocument' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DocumentAI\V1\ProcessResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'evaluation' => 'projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}', - 'humanReviewConfig' => 'projects/{project}/locations/{location}/processors/{processor}/humanReviewConfig', - 'location' => 'projects/{project}/locations/{location}', - 'processor' => 'projects/{project}/locations/{location}/processors/{processor}', - 'processorType' => 'projects/{project}/locations/{location}/processorTypes/{processor_type}', - 'processorVersion' => 'projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DocumentAi/v1/src/V1/resources/document_processor_service_rest_client_config.php b/owl-bot-staging/DocumentAi/v1/src/V1/resources/document_processor_service_rest_client_config.php deleted file mode 100644 index 014fb56a6f21..000000000000 --- a/owl-bot-staging/DocumentAi/v1/src/V1/resources/document_processor_service_rest_client_config.php +++ /dev/null @@ -1,389 +0,0 @@ - [ - 'google.cloud.documentai.v1.DocumentProcessorService' => [ - 'BatchProcessDocuments' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/processors/*}:batchProcess', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}:batchProcess', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateProcessor' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/processors', - 'body' => 'processor', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteProcessor' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/processors/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteProcessorVersion' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeployProcessorVersion' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}:deploy', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DisableProcessor' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/processors/*}:disable', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'EnableProcessor' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/processors/*}:enable', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'EvaluateProcessorVersion' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{processor_version=projects/*/locations/*/processors/*/processorVersions/*}:evaluateProcessorVersion', - 'body' => '*', - 'placeholders' => [ - 'processor_version' => [ - 'getters' => [ - 'getProcessorVersion', - ], - ], - ], - ], - 'FetchProcessorTypes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:fetchProcessorTypes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'GetEvaluation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/processors/*/processorVersions/*/evaluations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetProcessor' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/processors/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetProcessorType' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/processorTypes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetProcessorVersion' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListEvaluations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/processors/*/processorVersions/*}/evaluations', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListProcessorTypes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/processorTypes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListProcessorVersions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/processors/*}/processorVersions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListProcessors' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/processors', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ProcessDocument' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/processors/*}:process', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}:process', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ReviewDocument' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{human_review_config=projects/*/locations/*/processors/*/humanReviewConfig}:reviewDocument', - 'body' => '*', - 'placeholders' => [ - 'human_review_config' => [ - 'getters' => [ - 'getHumanReviewConfig', - ], - ], - ], - ], - 'SetDefaultProcessorVersion' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{processor=projects/*/locations/*/processors/*}:setDefaultProcessorVersion', - 'body' => '*', - 'placeholders' => [ - 'processor' => [ - 'getters' => [ - 'getProcessor', - ], - ], - ], - ], - 'TrainProcessorVersion' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/processors/*}/processorVersions:train', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UndeployProcessorVersion' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/processors/*/processorVersions/*}:undeploy', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/uiv1beta3/{name=projects/*/locations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/uiv1beta3/{name=projects/*}/locations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/uiv1beta3/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/uiv1beta3/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/uiv1beta3/{name=projects/*/locations/*/operations}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/DocumentAi/v1/tests/Unit/V1/Client/DocumentProcessorServiceClientTest.php b/owl-bot-staging/DocumentAi/v1/tests/Unit/V1/Client/DocumentProcessorServiceClientTest.php deleted file mode 100644 index 2eb82c84c2b4..000000000000 --- a/owl-bot-staging/DocumentAi/v1/tests/Unit/V1/Client/DocumentProcessorServiceClientTest.php +++ /dev/null @@ -1,2437 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return DocumentProcessorServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new DocumentProcessorServiceClient($options); - } - - /** @test */ - public function batchProcessDocumentsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/batchProcessDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new BatchProcessResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/batchProcessDocumentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $request = (new BatchProcessRequest()) - ->setName($name); - $response = $gapicClient->batchProcessDocuments($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/BatchProcessDocuments', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchProcessDocumentsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function batchProcessDocumentsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/batchProcessDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new BatchProcessRequest()) - ->setName($name); - $response = $gapicClient->batchProcessDocuments($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchProcessDocumentsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createProcessorTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $type = 'type3575610'; - $displayName = 'displayName1615086568'; - $defaultProcessorVersion = 'defaultProcessorVersion1185902509'; - $processEndpoint = 'processEndpoint-178717339'; - $kmsKeyName = 'kmsKeyName2094986649'; - $satisfiesPzs = false; - $satisfiesPzi = false; - $expectedResponse = new Processor(); - $expectedResponse->setName($name); - $expectedResponse->setType($type); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDefaultProcessorVersion($defaultProcessorVersion); - $expectedResponse->setProcessEndpoint($processEndpoint); - $expectedResponse->setKmsKeyName($kmsKeyName); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $processor = new Processor(); - $request = (new CreateProcessorRequest()) - ->setParent($formattedParent) - ->setProcessor($processor); - $response = $gapicClient->createProcessor($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/CreateProcessor', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getProcessor(); - $this->assertProtobufEquals($processor, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createProcessorExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $processor = new Processor(); - $request = (new CreateProcessorRequest()) - ->setParent($formattedParent) - ->setProcessor($processor); - try { - $gapicClient->createProcessor($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteProcessorTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteProcessorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteProcessorTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); - $request = (new DeleteProcessorRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteProcessor($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/DeleteProcessor', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteProcessorTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteProcessorExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteProcessorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); - $request = (new DeleteProcessorRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteProcessor($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteProcessorTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteProcessorVersionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteProcessorVersionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteProcessorVersionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->processorVersionName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]'); - $request = (new DeleteProcessorVersionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteProcessorVersion($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/DeleteProcessorVersion', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteProcessorVersionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteProcessorVersionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteProcessorVersionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->processorVersionName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]'); - $request = (new DeleteProcessorVersionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteProcessorVersion($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteProcessorVersionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deployProcessorVersionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deployProcessorVersionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new DeployProcessorVersionResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deployProcessorVersionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->processorVersionName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]'); - $request = (new DeployProcessorVersionRequest()) - ->setName($formattedName); - $response = $gapicClient->deployProcessorVersion($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/DeployProcessorVersion', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deployProcessorVersionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deployProcessorVersionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deployProcessorVersionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->processorVersionName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]'); - $request = (new DeployProcessorVersionRequest()) - ->setName($formattedName); - $response = $gapicClient->deployProcessorVersion($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deployProcessorVersionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function disableProcessorTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/disableProcessorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new DisableProcessorResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/disableProcessorTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); - $request = (new DisableProcessorRequest()) - ->setName($formattedName); - $response = $gapicClient->disableProcessor($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/DisableProcessor', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/disableProcessorTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function disableProcessorExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/disableProcessorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); - $request = (new DisableProcessorRequest()) - ->setName($formattedName); - $response = $gapicClient->disableProcessor($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/disableProcessorTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function enableProcessorTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/enableProcessorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new EnableProcessorResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/enableProcessorTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); - $request = (new EnableProcessorRequest()) - ->setName($formattedName); - $response = $gapicClient->enableProcessor($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/EnableProcessor', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/enableProcessorTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function enableProcessorExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/enableProcessorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); - $request = (new EnableProcessorRequest()) - ->setName($formattedName); - $response = $gapicClient->enableProcessor($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/enableProcessorTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function evaluateProcessorVersionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/evaluateProcessorVersionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $evaluation = 'evaluation858523452'; - $expectedResponse = new EvaluateProcessorVersionResponse(); - $expectedResponse->setEvaluation($evaluation); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/evaluateProcessorVersionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedProcessorVersion = $gapicClient->processorVersionName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]'); - $request = (new EvaluateProcessorVersionRequest()) - ->setProcessorVersion($formattedProcessorVersion); - $response = $gapicClient->evaluateProcessorVersion($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/EvaluateProcessorVersion', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getProcessorVersion(); - $this->assertProtobufEquals($formattedProcessorVersion, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/evaluateProcessorVersionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function evaluateProcessorVersionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/evaluateProcessorVersionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedProcessorVersion = $gapicClient->processorVersionName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]'); - $request = (new EvaluateProcessorVersionRequest()) - ->setProcessorVersion($formattedProcessorVersion); - $response = $gapicClient->evaluateProcessorVersion($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/evaluateProcessorVersionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function fetchProcessorTypesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new FetchProcessorTypesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new FetchProcessorTypesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->fetchProcessorTypes($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/FetchProcessorTypes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function fetchProcessorTypesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new FetchProcessorTypesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->fetchProcessorTypes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEvaluationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $kmsKeyName = 'kmsKeyName2094986649'; - $kmsKeyVersionName = 'kmsKeyVersionName-1734350176'; - $expectedResponse = new Evaluation(); - $expectedResponse->setName($name2); - $expectedResponse->setKmsKeyName($kmsKeyName); - $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->evaluationName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]', '[EVALUATION]'); - $request = (new GetEvaluationRequest()) - ->setName($formattedName); - $response = $gapicClient->getEvaluation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/GetEvaluation', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEvaluationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->evaluationName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]', '[EVALUATION]'); - $request = (new GetEvaluationRequest()) - ->setName($formattedName); - try { - $gapicClient->getEvaluation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getProcessorTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $type = 'type3575610'; - $displayName = 'displayName1615086568'; - $defaultProcessorVersion = 'defaultProcessorVersion1185902509'; - $processEndpoint = 'processEndpoint-178717339'; - $kmsKeyName = 'kmsKeyName2094986649'; - $satisfiesPzs = false; - $satisfiesPzi = false; - $expectedResponse = new Processor(); - $expectedResponse->setName($name2); - $expectedResponse->setType($type); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDefaultProcessorVersion($defaultProcessorVersion); - $expectedResponse->setProcessEndpoint($processEndpoint); - $expectedResponse->setKmsKeyName($kmsKeyName); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); - $request = (new GetProcessorRequest()) - ->setName($formattedName); - $response = $gapicClient->getProcessor($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/GetProcessor', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getProcessorExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); - $request = (new GetProcessorRequest()) - ->setName($formattedName); - try { - $gapicClient->getProcessor($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getProcessorTypeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $type = 'type3575610'; - $category = 'category50511102'; - $allowCreation = false; - $expectedResponse = new ProcessorType(); - $expectedResponse->setName($name2); - $expectedResponse->setType($type); - $expectedResponse->setCategory($category); - $expectedResponse->setAllowCreation($allowCreation); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->processorTypeName('[PROJECT]', '[LOCATION]', '[PROCESSOR_TYPE]'); - $request = (new GetProcessorTypeRequest()) - ->setName($formattedName); - $response = $gapicClient->getProcessorType($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/GetProcessorType', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getProcessorTypeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->processorTypeName('[PROJECT]', '[LOCATION]', '[PROCESSOR_TYPE]'); - $request = (new GetProcessorTypeRequest()) - ->setName($formattedName); - try { - $gapicClient->getProcessorType($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getProcessorVersionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $kmsKeyName = 'kmsKeyName2094986649'; - $kmsKeyVersionName = 'kmsKeyVersionName-1734350176'; - $googleManaged = false; - $satisfiesPzs = false; - $satisfiesPzi = false; - $expectedResponse = new ProcessorVersion(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setKmsKeyName($kmsKeyName); - $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName); - $expectedResponse->setGoogleManaged($googleManaged); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->processorVersionName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]'); - $request = (new GetProcessorVersionRequest()) - ->setName($formattedName); - $response = $gapicClient->getProcessorVersion($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/GetProcessorVersion', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getProcessorVersionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->processorVersionName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]'); - $request = (new GetProcessorVersionRequest()) - ->setName($formattedName); - try { - $gapicClient->getProcessorVersion($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEvaluationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $evaluationsElement = new Evaluation(); - $evaluations = [ - $evaluationsElement, - ]; - $expectedResponse = new ListEvaluationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEvaluations($evaluations); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->processorVersionName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]'); - $request = (new ListEvaluationsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listEvaluations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEvaluations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/ListEvaluations', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEvaluationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->processorVersionName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]'); - $request = (new ListEvaluationsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listEvaluations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listProcessorTypesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $processorTypesElement = new ProcessorType(); - $processorTypes = [ - $processorTypesElement, - ]; - $expectedResponse = new ListProcessorTypesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setProcessorTypes($processorTypes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListProcessorTypesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listProcessorTypes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getProcessorTypes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/ListProcessorTypes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listProcessorTypesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListProcessorTypesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listProcessorTypes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listProcessorVersionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $processorVersionsElement = new ProcessorVersion(); - $processorVersions = [ - $processorVersionsElement, - ]; - $expectedResponse = new ListProcessorVersionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setProcessorVersions($processorVersions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); - $request = (new ListProcessorVersionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listProcessorVersions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getProcessorVersions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/ListProcessorVersions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listProcessorVersionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); - $request = (new ListProcessorVersionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listProcessorVersions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listProcessorsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $processorsElement = new Processor(); - $processors = [ - $processorsElement, - ]; - $expectedResponse = new ListProcessorsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setProcessors($processors); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListProcessorsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listProcessors($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getProcessors()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/ListProcessors', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listProcessorsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListProcessorsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listProcessors($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function processDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ProcessResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new ProcessRequest()) - ->setName($name); - $response = $gapicClient->processDocument($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/ProcessDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function processDocumentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new ProcessRequest()) - ->setName($name); - try { - $gapicClient->processDocument($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function reviewDocumentTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/reviewDocumentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $gcsDestination = 'gcsDestination714819302'; - $rejectionReason = 'rejectionReason2141394746'; - $expectedResponse = new ReviewDocumentResponse(); - $expectedResponse->setGcsDestination($gcsDestination); - $expectedResponse->setRejectionReason($rejectionReason); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/reviewDocumentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedHumanReviewConfig = $gapicClient->humanReviewConfigName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); - $request = (new ReviewDocumentRequest()) - ->setHumanReviewConfig($formattedHumanReviewConfig); - $response = $gapicClient->reviewDocument($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/ReviewDocument', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getHumanReviewConfig(); - $this->assertProtobufEquals($formattedHumanReviewConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/reviewDocumentTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function reviewDocumentExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/reviewDocumentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedHumanReviewConfig = $gapicClient->humanReviewConfigName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); - $request = (new ReviewDocumentRequest()) - ->setHumanReviewConfig($formattedHumanReviewConfig); - $response = $gapicClient->reviewDocument($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/reviewDocumentTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function setDefaultProcessorVersionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/setDefaultProcessorVersionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new SetDefaultProcessorVersionResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/setDefaultProcessorVersionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedProcessor = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); - $formattedDefaultProcessorVersion = $gapicClient->processorVersionName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]'); - $request = (new SetDefaultProcessorVersionRequest()) - ->setProcessor($formattedProcessor) - ->setDefaultProcessorVersion($formattedDefaultProcessorVersion); - $response = $gapicClient->setDefaultProcessorVersion($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/SetDefaultProcessorVersion', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getProcessor(); - $this->assertProtobufEquals($formattedProcessor, $actualValue); - $actualValue = $actualApiRequestObject->getDefaultProcessorVersion(); - $this->assertProtobufEquals($formattedDefaultProcessorVersion, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/setDefaultProcessorVersionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function setDefaultProcessorVersionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/setDefaultProcessorVersionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedProcessor = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); - $formattedDefaultProcessorVersion = $gapicClient->processorVersionName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]'); - $request = (new SetDefaultProcessorVersionRequest()) - ->setProcessor($formattedProcessor) - ->setDefaultProcessorVersion($formattedDefaultProcessorVersion); - $response = $gapicClient->setDefaultProcessorVersion($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/setDefaultProcessorVersionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function trainProcessorVersionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/trainProcessorVersionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $processorVersion2 = 'processorVersion2-1092580578'; - $expectedResponse = new TrainProcessorVersionResponse(); - $expectedResponse->setProcessorVersion($processorVersion2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/trainProcessorVersionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); - $processorVersion = new ProcessorVersion(); - $request = (new TrainProcessorVersionRequest()) - ->setParent($formattedParent) - ->setProcessorVersion($processorVersion); - $response = $gapicClient->trainProcessorVersion($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/TrainProcessorVersion', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getProcessorVersion(); - $this->assertProtobufEquals($processorVersion, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/trainProcessorVersionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function trainProcessorVersionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/trainProcessorVersionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); - $processorVersion = new ProcessorVersion(); - $request = (new TrainProcessorVersionRequest()) - ->setParent($formattedParent) - ->setProcessorVersion($processorVersion); - $response = $gapicClient->trainProcessorVersion($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/trainProcessorVersionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function undeployProcessorVersionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/undeployProcessorVersionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new UndeployProcessorVersionResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/undeployProcessorVersionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->processorVersionName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]'); - $request = (new UndeployProcessorVersionRequest()) - ->setName($formattedName); - $response = $gapicClient->undeployProcessorVersion($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/UndeployProcessorVersion', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/undeployProcessorVersionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function undeployProcessorVersionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/undeployProcessorVersionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->processorVersionName('[PROJECT]', '[LOCATION]', '[PROCESSOR]', '[PROCESSOR_VERSION]'); - $request = (new UndeployProcessorVersionRequest()) - ->setName($formattedName); - $response = $gapicClient->undeployProcessorVersion($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/undeployProcessorVersionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchProcessDocumentsAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/batchProcessDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new BatchProcessResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/batchProcessDocumentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $request = (new BatchProcessRequest()) - ->setName($name); - $response = $gapicClient->batchProcessDocumentsAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.documentai.v1.DocumentProcessorService/BatchProcessDocuments', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchProcessDocumentsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -}