From 3a420ff24139802eeef79f71adde3ee2b2fdbea9 Mon Sep 17 00:00:00 2001 From: Kristen O'Leary Date: Tue, 12 Mar 2019 13:49:29 -0400 Subject: [PATCH 1/2] Add Cloud Video Intelligence v1p3beta1 API. --- .../pom.xml | 31 + ...StreamingVideoIntelligenceServiceGrpc.java | 347 ++ .../VideoIntelligenceServiceGrpc.java | 364 ++ google-api-grpc/pom.xml | 12 + .../pom.xml | 26 + .../v1p3beta1/AnnotateVideoProgress.java | 1025 ++++ .../AnnotateVideoProgressOrBuilder.java | 76 + .../v1p3beta1/AnnotateVideoRequest.java | 1754 +++++++ .../AnnotateVideoRequestOrBuilder.java | 200 + .../v1p3beta1/AnnotateVideoResponse.java | 1025 ++++ .../AnnotateVideoResponseOrBuilder.java | 76 + .../videointelligence/v1p3beta1/Entity.java | 935 ++++ .../v1p3beta1/EntityOrBuilder.java | 77 + .../v1p3beta1/ExplicitContentAnnotation.java | 994 ++++ .../ExplicitContentAnnotationOrBuilder.java | 69 + .../ExplicitContentDetectionConfig.java | 639 +++ ...plicitContentDetectionConfigOrBuilder.java | 35 + .../v1p3beta1/ExplicitContentFrame.java | 859 +++ .../ExplicitContentFrameOrBuilder.java | 65 + .../videointelligence/v1p3beta1/Feature.java | 218 + .../v1p3beta1/LabelAnnotation.java | 2295 ++++++++ .../v1p3beta1/LabelAnnotationOrBuilder.java | 214 + .../v1p3beta1/LabelDetectionConfig.java | 872 ++++ .../LabelDetectionConfigOrBuilder.java | 75 + .../v1p3beta1/LabelDetectionMode.java | 176 + .../v1p3beta1/LabelFrame.java | 795 +++ .../v1p3beta1/LabelFrameOrBuilder.java | 55 + .../v1p3beta1/LabelSegment.java | 791 +++ .../v1p3beta1/LabelSegmentOrBuilder.java | 52 + .../v1p3beta1/Likelihood.java | 218 + .../v1p3beta1/NormalizedBoundingBox.java | 786 +++ .../NormalizedBoundingBoxOrBuilder.java | 54 + .../v1p3beta1/NormalizedBoundingPoly.java | 1009 ++++ .../NormalizedBoundingPolyOrBuilder.java | 63 + .../v1p3beta1/NormalizedVertex.java | 613 +++ .../v1p3beta1/NormalizedVertexOrBuilder.java | 32 + .../v1p3beta1/ObjectTrackingAnnotation.java | 1903 +++++++ .../ObjectTrackingAnnotationOrBuilder.java | 174 + .../v1p3beta1/ObjectTrackingFrame.java | 1014 ++++ .../ObjectTrackingFrameOrBuilder.java | 79 + .../v1p3beta1/ShotChangeDetectionConfig.java | 626 +++ .../ShotChangeDetectionConfigOrBuilder.java | 35 + .../StreamingAnnotateVideoRequest.java | 993 ++++ ...treamingAnnotateVideoRequestOrBuilder.java | 67 + .../StreamingAnnotateVideoResponse.java | 1222 +++++ ...reamingAnnotateVideoResponseOrBuilder.java | 110 + ...reamingExplicitContentDetectionConfig.java | 476 ++ ...plicitContentDetectionConfigOrBuilder.java | 9 + .../v1p3beta1/StreamingFeature.java | 196 + .../StreamingLabelDetectionConfig.java | 551 ++ ...treamingLabelDetectionConfigOrBuilder.java | 23 + .../StreamingObjectTrackingConfig.java | 461 ++ ...treamingObjectTrackingConfigOrBuilder.java | 9 + .../StreamingShotChangeDetectionConfig.java | 467 ++ ...ingShotChangeDetectionConfigOrBuilder.java | 9 + .../v1p3beta1/StreamingStorageConfig.java | 764 +++ .../StreamingStorageConfigOrBuilder.java | 60 + .../StreamingVideoAnnotationResults.java | 2436 +++++++++ ...eamingVideoAnnotationResultsOrBuilder.java | 232 + .../v1p3beta1/StreamingVideoConfig.java | 2388 +++++++++ .../StreamingVideoConfigOrBuilder.java | 225 + .../v1p3beta1/TextAnnotation.java | 1116 ++++ .../v1p3beta1/TextAnnotationOrBuilder.java | 83 + .../v1p3beta1/TextDetectionConfig.java | 729 +++ .../TextDetectionConfigOrBuilder.java | 63 + .../v1p3beta1/TextFrame.java | 1008 ++++ .../v1p3beta1/TextFrameOrBuilder.java | 79 + .../v1p3beta1/TextSegment.java | 1301 +++++ .../v1p3beta1/TextSegmentOrBuilder.java | 105 + .../v1p3beta1/VideoAnnotationProgress.java | 1220 +++++ .../VideoAnnotationProgressOrBuilder.java | 107 + .../v1p3beta1/VideoAnnotationResults.java | 4645 +++++++++++++++++ .../VideoAnnotationResultsOrBuilder.java | 507 ++ .../v1p3beta1/VideoContext.java | 2228 ++++++++ .../v1p3beta1/VideoContextOrBuilder.java | 224 + .../VideoIntelligenceServiceProto.java | 665 +++ .../v1p3beta1/VideoSegment.java | 992 ++++ .../v1p3beta1/VideoSegmentOrBuilder.java | 78 + .../v1p3beta1/video_intelligence.proto | 627 +++ google-cloud-bom/pom.xml | 10 + .../google-cloud-video-intelligence/pom.xml | 9 + ...reamingVideoIntelligenceServiceClient.java | 209 + ...amingVideoIntelligenceServiceSettings.java | 182 + .../VideoIntelligenceServiceClient.java | 328 ++ .../VideoIntelligenceServiceSettings.java | 197 + .../v1p3beta1/package-info.java | 55 + ...deoIntelligenceServiceCallableFactory.java | 116 + ...StreamingVideoIntelligenceServiceStub.java | 157 + ...deoIntelligenceServiceCallableFactory.java | 115 + .../GrpcVideoIntelligenceServiceStub.java | 171 + ...StreamingVideoIntelligenceServiceStub.java | 42 + ...gVideoIntelligenceServiceStubSettings.java | 269 + .../stub/VideoIntelligenceServiceStub.java | 56 + .../VideoIntelligenceServiceStubSettings.java | 322 ++ ...MockStreamingVideoIntelligenceService.java | 57 + ...StreamingVideoIntelligenceServiceImpl.java | 89 + .../MockVideoIntelligenceService.java | 57 + .../MockVideoIntelligenceServiceImpl.java | 74 + ...ingVideoIntelligenceServiceClientTest.java | 135 + .../VideoIntelligenceServiceClientTest.java | 134 + .../VideoIntelligenceServiceSmokeTest.java | 66 + .../synth.metadata | 20 +- .../google-cloud-video-intelligence/synth.py | 2 +- versions.txt | 2 + 104 files changed, 50101 insertions(+), 6 deletions(-) create mode 100644 google-api-grpc/grpc-google-cloud-video-intelligence-v1p3beta1/pom.xml create mode 100644 google-api-grpc/grpc-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoIntelligenceServiceGrpc.java create mode 100644 google-api-grpc/grpc-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoIntelligenceServiceGrpc.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/pom.xml create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/AnnotateVideoProgress.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/AnnotateVideoProgressOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/AnnotateVideoRequest.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/AnnotateVideoRequestOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/AnnotateVideoResponse.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/AnnotateVideoResponseOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/Entity.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/EntityOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ExplicitContentAnnotation.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ExplicitContentAnnotationOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ExplicitContentDetectionConfig.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ExplicitContentDetectionConfigOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ExplicitContentFrame.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ExplicitContentFrameOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/Feature.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelAnnotation.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelAnnotationOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelDetectionConfig.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelDetectionConfigOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelDetectionMode.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelFrame.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelFrameOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelSegment.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelSegmentOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/Likelihood.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/NormalizedBoundingBox.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/NormalizedBoundingBoxOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/NormalizedBoundingPoly.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/NormalizedBoundingPolyOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/NormalizedVertex.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/NormalizedVertexOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ObjectTrackingAnnotation.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ObjectTrackingAnnotationOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ObjectTrackingFrame.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ObjectTrackingFrameOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ShotChangeDetectionConfig.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ShotChangeDetectionConfigOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingAnnotateVideoRequest.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingAnnotateVideoRequestOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingAnnotateVideoResponse.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingAnnotateVideoResponseOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingExplicitContentDetectionConfig.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingExplicitContentDetectionConfigOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingFeature.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingLabelDetectionConfig.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingLabelDetectionConfigOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingObjectTrackingConfig.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingObjectTrackingConfigOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingShotChangeDetectionConfig.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingShotChangeDetectionConfigOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingStorageConfig.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingStorageConfigOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoAnnotationResults.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoAnnotationResultsOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoConfig.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoConfigOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextAnnotation.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextAnnotationOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextDetectionConfig.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextDetectionConfigOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextFrame.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextFrameOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextSegment.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextSegmentOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoAnnotationProgress.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoAnnotationProgressOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoAnnotationResults.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoAnnotationResultsOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoContext.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoContextOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoIntelligenceServiceProto.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoSegment.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoSegmentOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/proto/google/cloud/videointelligence/v1p3beta1/video_intelligence.proto create mode 100644 google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoIntelligenceServiceClient.java create mode 100644 google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoIntelligenceServiceSettings.java create mode 100644 google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoIntelligenceServiceClient.java create mode 100644 google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoIntelligenceServiceSettings.java create mode 100644 google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/package-info.java create mode 100644 google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/GrpcStreamingVideoIntelligenceServiceCallableFactory.java create mode 100644 google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/GrpcStreamingVideoIntelligenceServiceStub.java create mode 100644 google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/GrpcVideoIntelligenceServiceCallableFactory.java create mode 100644 google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/GrpcVideoIntelligenceServiceStub.java create mode 100644 google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/StreamingVideoIntelligenceServiceStub.java create mode 100644 google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/StreamingVideoIntelligenceServiceStubSettings.java create mode 100644 google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/VideoIntelligenceServiceStub.java create mode 100644 google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/VideoIntelligenceServiceStubSettings.java create mode 100644 google-cloud-clients/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p3beta1/MockStreamingVideoIntelligenceService.java create mode 100644 google-cloud-clients/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p3beta1/MockStreamingVideoIntelligenceServiceImpl.java create mode 100644 google-cloud-clients/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p3beta1/MockVideoIntelligenceService.java create mode 100644 google-cloud-clients/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p3beta1/MockVideoIntelligenceServiceImpl.java create mode 100644 google-cloud-clients/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoIntelligenceServiceClientTest.java create mode 100644 google-cloud-clients/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p3beta1/VideoIntelligenceServiceClientTest.java create mode 100644 google-cloud-clients/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p3beta1/VideoIntelligenceServiceSmokeTest.java diff --git a/google-api-grpc/grpc-google-cloud-video-intelligence-v1p3beta1/pom.xml b/google-api-grpc/grpc-google-cloud-video-intelligence-v1p3beta1/pom.xml new file mode 100644 index 000000000000..ad3c2dd09cb1 --- /dev/null +++ b/google-api-grpc/grpc-google-cloud-video-intelligence-v1p3beta1/pom.xml @@ -0,0 +1,31 @@ + + 4.0.0 + grpc-google-cloud-video-intelligence-v1p3beta1 + 0.48.1-SNAPSHOT + grpc-google-cloud-video-intelligence-v1p3beta1 + GRPC library for grpc-google-cloud-video-intelligence-v1p3beta1 + + com.google.api.grpc + google-api-grpc + 0.48.1-SNAPSHOT + + + + io.grpc + grpc-stub + compile + + + io.grpc + grpc-protobuf + compile + + + com.google.api.grpc + proto-google-cloud-video-intelligence-v1p3beta1 + compile + + + diff --git a/google-api-grpc/grpc-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoIntelligenceServiceGrpc.java b/google-api-grpc/grpc-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoIntelligenceServiceGrpc.java new file mode 100644 index 000000000000..d54504a03f5f --- /dev/null +++ b/google-api-grpc/grpc-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoIntelligenceServiceGrpc.java @@ -0,0 +1,347 @@ +package com.google.cloud.videointelligence.v1p3beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; + +/** + * + * + *
+ * Service that implements Google Cloud Video Intelligence Streaming API.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.10.0)", + comments = "Source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto") +public final class StreamingVideoIntelligenceServiceGrpc { + + private StreamingVideoIntelligenceServiceGrpc() {} + + public static final String SERVICE_NAME = + "google.cloud.videointelligence.v1p3beta1.StreamingVideoIntelligenceService"; + + // Static method descriptors that strictly reflect the proto. + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getStreamingAnnotateVideoMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest, + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse> + METHOD_STREAMING_ANNOTATE_VIDEO = getStreamingAnnotateVideoMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest, + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse> + getStreamingAnnotateVideoMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest, + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse> + getStreamingAnnotateVideoMethod() { + return getStreamingAnnotateVideoMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest, + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse> + getStreamingAnnotateVideoMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest, + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse> + getStreamingAnnotateVideoMethod; + if ((getStreamingAnnotateVideoMethod = + StreamingVideoIntelligenceServiceGrpc.getStreamingAnnotateVideoMethod) + == null) { + synchronized (StreamingVideoIntelligenceServiceGrpc.class) { + if ((getStreamingAnnotateVideoMethod = + StreamingVideoIntelligenceServiceGrpc.getStreamingAnnotateVideoMethod) + == null) { + StreamingVideoIntelligenceServiceGrpc.getStreamingAnnotateVideoMethod = + getStreamingAnnotateVideoMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName( + generateFullMethodName( + "google.cloud.videointelligence.v1p3beta1.StreamingVideoIntelligenceService", + "StreamingAnnotateVideo")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.videointelligence.v1p3beta1 + .StreamingAnnotateVideoRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.videointelligence.v1p3beta1 + .StreamingAnnotateVideoResponse.getDefaultInstance())) + .setSchemaDescriptor( + new StreamingVideoIntelligenceServiceMethodDescriptorSupplier( + "StreamingAnnotateVideo")) + .build(); + } + } + } + return getStreamingAnnotateVideoMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static StreamingVideoIntelligenceServiceStub newStub(io.grpc.Channel channel) { + return new StreamingVideoIntelligenceServiceStub(channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static StreamingVideoIntelligenceServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + return new StreamingVideoIntelligenceServiceBlockingStub(channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static StreamingVideoIntelligenceServiceFutureStub newFutureStub(io.grpc.Channel channel) { + return new StreamingVideoIntelligenceServiceFutureStub(channel); + } + + /** + * + * + *
+   * Service that implements Google Cloud Video Intelligence Streaming API.
+   * 
+ */ + public abstract static class StreamingVideoIntelligenceServiceImplBase + implements io.grpc.BindableService { + + /** + * + * + *
+     * Performs video annotation with bidirectional streaming: emitting results
+     * while sending video/audio bytes.
+     * This method is only available via the gRPC API (not REST).
+     * 
+ */ + public io.grpc.stub.StreamObserver< + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest> + streamingAnnotateVideo( + io.grpc.stub.StreamObserver< + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse> + responseObserver) { + return asyncUnimplementedStreamingCall( + getStreamingAnnotateVideoMethodHelper(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getStreamingAnnotateVideoMethodHelper(), + asyncBidiStreamingCall( + new MethodHandlers< + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest, + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse>( + this, METHODID_STREAMING_ANNOTATE_VIDEO))) + .build(); + } + } + + /** + * + * + *
+   * Service that implements Google Cloud Video Intelligence Streaming API.
+   * 
+ */ + public static final class StreamingVideoIntelligenceServiceStub + extends io.grpc.stub.AbstractStub { + private StreamingVideoIntelligenceServiceStub(io.grpc.Channel channel) { + super(channel); + } + + private StreamingVideoIntelligenceServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected StreamingVideoIntelligenceServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new StreamingVideoIntelligenceServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Performs video annotation with bidirectional streaming: emitting results
+     * while sending video/audio bytes.
+     * This method is only available via the gRPC API (not REST).
+     * 
+ */ + public io.grpc.stub.StreamObserver< + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest> + streamingAnnotateVideo( + io.grpc.stub.StreamObserver< + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse> + responseObserver) { + return asyncBidiStreamingCall( + getChannel().newCall(getStreamingAnnotateVideoMethodHelper(), getCallOptions()), + responseObserver); + } + } + + /** + * + * + *
+   * Service that implements Google Cloud Video Intelligence Streaming API.
+   * 
+ */ + public static final class StreamingVideoIntelligenceServiceBlockingStub + extends io.grpc.stub.AbstractStub { + private StreamingVideoIntelligenceServiceBlockingStub(io.grpc.Channel channel) { + super(channel); + } + + private StreamingVideoIntelligenceServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected StreamingVideoIntelligenceServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new StreamingVideoIntelligenceServiceBlockingStub(channel, callOptions); + } + } + + /** + * + * + *
+   * Service that implements Google Cloud Video Intelligence Streaming API.
+   * 
+ */ + public static final class StreamingVideoIntelligenceServiceFutureStub + extends io.grpc.stub.AbstractStub { + private StreamingVideoIntelligenceServiceFutureStub(io.grpc.Channel channel) { + super(channel); + } + + private StreamingVideoIntelligenceServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected StreamingVideoIntelligenceServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new StreamingVideoIntelligenceServiceFutureStub(channel, callOptions); + } + } + + private static final int METHODID_STREAMING_ANNOTATE_VIDEO = 0; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final StreamingVideoIntelligenceServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(StreamingVideoIntelligenceServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_STREAMING_ANNOTATE_VIDEO: + return (io.grpc.stub.StreamObserver) + serviceImpl.streamingAnnotateVideo( + (io.grpc.stub.StreamObserver< + com.google.cloud.videointelligence.v1p3beta1 + .StreamingAnnotateVideoResponse>) + responseObserver); + default: + throw new AssertionError(); + } + } + } + + private abstract static class StreamingVideoIntelligenceServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + StreamingVideoIntelligenceServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("StreamingVideoIntelligenceService"); + } + } + + private static final class StreamingVideoIntelligenceServiceFileDescriptorSupplier + extends StreamingVideoIntelligenceServiceBaseDescriptorSupplier { + StreamingVideoIntelligenceServiceFileDescriptorSupplier() {} + } + + private static final class StreamingVideoIntelligenceServiceMethodDescriptorSupplier + extends StreamingVideoIntelligenceServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + StreamingVideoIntelligenceServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (StreamingVideoIntelligenceServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor( + new StreamingVideoIntelligenceServiceFileDescriptorSupplier()) + .addMethod(getStreamingAnnotateVideoMethodHelper()) + .build(); + } + } + } + return result; + } +} diff --git a/google-api-grpc/grpc-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoIntelligenceServiceGrpc.java b/google-api-grpc/grpc-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoIntelligenceServiceGrpc.java new file mode 100644 index 000000000000..df8a05c00c12 --- /dev/null +++ b/google-api-grpc/grpc-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoIntelligenceServiceGrpc.java @@ -0,0 +1,364 @@ +package com.google.cloud.videointelligence.v1p3beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + * + * + *
+ * Service that implements Google Cloud Video Intelligence API.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.10.0)", + comments = "Source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto") +public final class VideoIntelligenceServiceGrpc { + + private VideoIntelligenceServiceGrpc() {} + + public static final String SERVICE_NAME = + "google.cloud.videointelligence.v1p3beta1.VideoIntelligenceService"; + + // Static method descriptors that strictly reflect the proto. + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getAnnotateVideoMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest, + com.google.longrunning.Operation> + METHOD_ANNOTATE_VIDEO = getAnnotateVideoMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest, + com.google.longrunning.Operation> + getAnnotateVideoMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest, + com.google.longrunning.Operation> + getAnnotateVideoMethod() { + return getAnnotateVideoMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest, + com.google.longrunning.Operation> + getAnnotateVideoMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest, + com.google.longrunning.Operation> + getAnnotateVideoMethod; + if ((getAnnotateVideoMethod = VideoIntelligenceServiceGrpc.getAnnotateVideoMethod) == null) { + synchronized (VideoIntelligenceServiceGrpc.class) { + if ((getAnnotateVideoMethod = VideoIntelligenceServiceGrpc.getAnnotateVideoMethod) + == null) { + VideoIntelligenceServiceGrpc.getAnnotateVideoMethod = + getAnnotateVideoMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.videointelligence.v1p3beta1.VideoIntelligenceService", + "AnnotateVideo")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new VideoIntelligenceServiceMethodDescriptorSupplier("AnnotateVideo")) + .build(); + } + } + } + return getAnnotateVideoMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static VideoIntelligenceServiceStub newStub(io.grpc.Channel channel) { + return new VideoIntelligenceServiceStub(channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static VideoIntelligenceServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + return new VideoIntelligenceServiceBlockingStub(channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static VideoIntelligenceServiceFutureStub newFutureStub(io.grpc.Channel channel) { + return new VideoIntelligenceServiceFutureStub(channel); + } + + /** + * + * + *
+   * Service that implements Google Cloud Video Intelligence API.
+   * 
+ */ + public abstract static class VideoIntelligenceServiceImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Performs asynchronous video annotation. Progress and results can be
+     * retrieved through the `google.longrunning.Operations` interface.
+     * `Operation.metadata` contains `AnnotateVideoProgress` (progress).
+     * `Operation.response` contains `AnnotateVideoResponse` (results).
+     * 
+ */ + public void annotateVideo( + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getAnnotateVideoMethodHelper(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getAnnotateVideoMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest, + com.google.longrunning.Operation>(this, METHODID_ANNOTATE_VIDEO))) + .build(); + } + } + + /** + * + * + *
+   * Service that implements Google Cloud Video Intelligence API.
+   * 
+ */ + public static final class VideoIntelligenceServiceStub + extends io.grpc.stub.AbstractStub { + private VideoIntelligenceServiceStub(io.grpc.Channel channel) { + super(channel); + } + + private VideoIntelligenceServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected VideoIntelligenceServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new VideoIntelligenceServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Performs asynchronous video annotation. Progress and results can be
+     * retrieved through the `google.longrunning.Operations` interface.
+     * `Operation.metadata` contains `AnnotateVideoProgress` (progress).
+     * `Operation.response` contains `AnnotateVideoResponse` (results).
+     * 
+ */ + public void annotateVideo( + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getAnnotateVideoMethodHelper(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Service that implements Google Cloud Video Intelligence API.
+   * 
+ */ + public static final class VideoIntelligenceServiceBlockingStub + extends io.grpc.stub.AbstractStub { + private VideoIntelligenceServiceBlockingStub(io.grpc.Channel channel) { + super(channel); + } + + private VideoIntelligenceServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected VideoIntelligenceServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new VideoIntelligenceServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Performs asynchronous video annotation. Progress and results can be
+     * retrieved through the `google.longrunning.Operations` interface.
+     * `Operation.metadata` contains `AnnotateVideoProgress` (progress).
+     * `Operation.response` contains `AnnotateVideoResponse` (results).
+     * 
+ */ + public com.google.longrunning.Operation annotateVideo( + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest request) { + return blockingUnaryCall( + getChannel(), getAnnotateVideoMethodHelper(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Service that implements Google Cloud Video Intelligence API.
+   * 
+ */ + public static final class VideoIntelligenceServiceFutureStub + extends io.grpc.stub.AbstractStub { + private VideoIntelligenceServiceFutureStub(io.grpc.Channel channel) { + super(channel); + } + + private VideoIntelligenceServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected VideoIntelligenceServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new VideoIntelligenceServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Performs asynchronous video annotation. Progress and results can be
+     * retrieved through the `google.longrunning.Operations` interface.
+     * `Operation.metadata` contains `AnnotateVideoProgress` (progress).
+     * `Operation.response` contains `AnnotateVideoResponse` (results).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + annotateVideo(com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest request) { + return futureUnaryCall( + getChannel().newCall(getAnnotateVideoMethodHelper(), getCallOptions()), request); + } + } + + private static final int METHODID_ANNOTATE_VIDEO = 0; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final VideoIntelligenceServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(VideoIntelligenceServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_ANNOTATE_VIDEO: + serviceImpl.annotateVideo( + (com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class VideoIntelligenceServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + VideoIntelligenceServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("VideoIntelligenceService"); + } + } + + private static final class VideoIntelligenceServiceFileDescriptorSupplier + extends VideoIntelligenceServiceBaseDescriptorSupplier { + VideoIntelligenceServiceFileDescriptorSupplier() {} + } + + private static final class VideoIntelligenceServiceMethodDescriptorSupplier + extends VideoIntelligenceServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + VideoIntelligenceServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (VideoIntelligenceServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new VideoIntelligenceServiceFileDescriptorSupplier()) + .addMethod(getAnnotateVideoMethodHelper()) + .build(); + } + } + } + return result; + } +} diff --git a/google-api-grpc/pom.xml b/google-api-grpc/pom.xml index f333662374da..ea4922559385 100644 --- a/google-api-grpc/pom.xml +++ b/google-api-grpc/pom.xml @@ -634,6 +634,16 @@ grpc-google-cloud-video-intelligence-v1p2beta1 0.48.1-SNAPSHOT + + com.google.api.grpc + proto-google-cloud-video-intelligence-v1p3beta1 + 0.48.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-video-intelligence-v1p3beta1 + 0.48.1-SNAPSHOT + com.google.api.grpc proto-google-cloud-iot-v1 @@ -736,6 +746,7 @@ grpc-google-cloud-video-intelligence-v1beta2 grpc-google-cloud-video-intelligence-v1p1beta1 grpc-google-cloud-video-intelligence-v1p2beta1 + grpc-google-cloud-video-intelligence-v1p3beta1 grpc-google-cloud-vision-v1 grpc-google-cloud-vision-v1p1beta1 grpc-google-cloud-vision-v1p2beta1 @@ -792,6 +803,7 @@ proto-google-cloud-video-intelligence-v1beta2 proto-google-cloud-video-intelligence-v1p1beta1 proto-google-cloud-video-intelligence-v1p2beta1 + proto-google-cloud-video-intelligence-v1p3beta1 proto-google-cloud-vision-v1 proto-google-cloud-vision-v1p1beta1 proto-google-cloud-vision-v1p2beta1 diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/pom.xml b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/pom.xml new file mode 100644 index 000000000000..91d7ac9a8d72 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/pom.xml @@ -0,0 +1,26 @@ + + 4.0.0 + proto-google-cloud-video-intelligence-v1p3beta1 + 0.48.1-SNAPSHOT + proto-google-cloud-video-intelligence-v1p3beta1 + PROTO library for proto-google-cloud-video-intelligence-v1p3beta1 + + com.google.api.grpc + google-api-grpc + 0.48.1-SNAPSHOT + + + + com.google.protobuf + protobuf-java + compile + + + com.google.api.grpc + proto-google-common-protos + compile + + + diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/AnnotateVideoProgress.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/AnnotateVideoProgress.java new file mode 100644 index 000000000000..5d4dd05b7f93 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/AnnotateVideoProgress.java @@ -0,0 +1,1025 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Video annotation progress. Included in the `metadata`
+ * field of the `Operation` returned by the `GetOperation`
+ * call of the `google::longrunning::Operations` service.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress} + */ +public final class AnnotateVideoProgress extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress) + AnnotateVideoProgressOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnnotateVideoProgress.newBuilder() to construct. + private AnnotateVideoProgress(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnnotateVideoProgress() { + annotationProgress_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AnnotateVideoProgress( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + annotationProgress_ = + new java.util.ArrayList< + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress>(); + mutable_bitField0_ |= 0x00000001; + } + annotationProgress_.add( + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + annotationProgress_ = java.util.Collections.unmodifiableList(annotationProgress_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_AnnotateVideoProgress_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_AnnotateVideoProgress_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress.class, + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress.Builder.class); + } + + public static final int ANNOTATION_PROGRESS_FIELD_NUMBER = 1; + private java.util.List + annotationProgress_; + /** + * + * + *
+   * Progress metadata for all videos specified in `AnnotateVideoRequest`.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress annotation_progress = 1; + * + */ + public java.util.List + getAnnotationProgressList() { + return annotationProgress_; + } + /** + * + * + *
+   * Progress metadata for all videos specified in `AnnotateVideoRequest`.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress annotation_progress = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgressOrBuilder> + getAnnotationProgressOrBuilderList() { + return annotationProgress_; + } + /** + * + * + *
+   * Progress metadata for all videos specified in `AnnotateVideoRequest`.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress annotation_progress = 1; + * + */ + public int getAnnotationProgressCount() { + return annotationProgress_.size(); + } + /** + * + * + *
+   * Progress metadata for all videos specified in `AnnotateVideoRequest`.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress annotation_progress = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress getAnnotationProgress( + int index) { + return annotationProgress_.get(index); + } + /** + * + * + *
+   * Progress metadata for all videos specified in `AnnotateVideoRequest`.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress annotation_progress = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgressOrBuilder + getAnnotationProgressOrBuilder(int index) { + return annotationProgress_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < annotationProgress_.size(); i++) { + output.writeMessage(1, annotationProgress_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < annotationProgress_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, annotationProgress_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress other = + (com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress) obj; + + boolean result = true; + result = result && getAnnotationProgressList().equals(other.getAnnotationProgressList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAnnotationProgressCount() > 0) { + hash = (37 * hash) + ANNOTATION_PROGRESS_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationProgressList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Video annotation progress. Included in the `metadata`
+   * field of the `Operation` returned by the `GetOperation`
+   * call of the `google::longrunning::Operations` service.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress) + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgressOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_AnnotateVideoProgress_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_AnnotateVideoProgress_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress.class, + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress.Builder.class); + } + + // Construct using + // com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAnnotationProgressFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (annotationProgressBuilder_ == null) { + annotationProgress_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + annotationProgressBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_AnnotateVideoProgress_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress + getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress build() { + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress result = + new com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress(this); + int from_bitField0_ = bitField0_; + if (annotationProgressBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + annotationProgress_ = java.util.Collections.unmodifiableList(annotationProgress_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.annotationProgress_ = annotationProgress_; + } else { + result.annotationProgress_ = annotationProgressBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress) { + return mergeFrom( + (com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress other) { + if (other + == com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress + .getDefaultInstance()) return this; + if (annotationProgressBuilder_ == null) { + if (!other.annotationProgress_.isEmpty()) { + if (annotationProgress_.isEmpty()) { + annotationProgress_ = other.annotationProgress_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAnnotationProgressIsMutable(); + annotationProgress_.addAll(other.annotationProgress_); + } + onChanged(); + } + } else { + if (!other.annotationProgress_.isEmpty()) { + if (annotationProgressBuilder_.isEmpty()) { + annotationProgressBuilder_.dispose(); + annotationProgressBuilder_ = null; + annotationProgress_ = other.annotationProgress_; + bitField0_ = (bitField0_ & ~0x00000001); + annotationProgressBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAnnotationProgressFieldBuilder() + : null; + } else { + annotationProgressBuilder_.addAllMessages(other.annotationProgress_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + annotationProgress_ = java.util.Collections.emptyList(); + + private void ensureAnnotationProgressIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + annotationProgress_ = + new java.util.ArrayList< + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress>( + annotationProgress_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress, + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress.Builder, + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgressOrBuilder> + annotationProgressBuilder_; + + /** + * + * + *
+     * Progress metadata for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress annotation_progress = 1; + * + */ + public java.util.List + getAnnotationProgressList() { + if (annotationProgressBuilder_ == null) { + return java.util.Collections.unmodifiableList(annotationProgress_); + } else { + return annotationProgressBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Progress metadata for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress annotation_progress = 1; + * + */ + public int getAnnotationProgressCount() { + if (annotationProgressBuilder_ == null) { + return annotationProgress_.size(); + } else { + return annotationProgressBuilder_.getCount(); + } + } + /** + * + * + *
+     * Progress metadata for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress annotation_progress = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress + getAnnotationProgress(int index) { + if (annotationProgressBuilder_ == null) { + return annotationProgress_.get(index); + } else { + return annotationProgressBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Progress metadata for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress annotation_progress = 1; + * + */ + public Builder setAnnotationProgress( + int index, com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress value) { + if (annotationProgressBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationProgressIsMutable(); + annotationProgress_.set(index, value); + onChanged(); + } else { + annotationProgressBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Progress metadata for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress annotation_progress = 1; + * + */ + public Builder setAnnotationProgress( + int index, + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress.Builder + builderForValue) { + if (annotationProgressBuilder_ == null) { + ensureAnnotationProgressIsMutable(); + annotationProgress_.set(index, builderForValue.build()); + onChanged(); + } else { + annotationProgressBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Progress metadata for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress annotation_progress = 1; + * + */ + public Builder addAnnotationProgress( + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress value) { + if (annotationProgressBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationProgressIsMutable(); + annotationProgress_.add(value); + onChanged(); + } else { + annotationProgressBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Progress metadata for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress annotation_progress = 1; + * + */ + public Builder addAnnotationProgress( + int index, com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress value) { + if (annotationProgressBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationProgressIsMutable(); + annotationProgress_.add(index, value); + onChanged(); + } else { + annotationProgressBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Progress metadata for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress annotation_progress = 1; + * + */ + public Builder addAnnotationProgress( + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress.Builder + builderForValue) { + if (annotationProgressBuilder_ == null) { + ensureAnnotationProgressIsMutable(); + annotationProgress_.add(builderForValue.build()); + onChanged(); + } else { + annotationProgressBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Progress metadata for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress annotation_progress = 1; + * + */ + public Builder addAnnotationProgress( + int index, + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress.Builder + builderForValue) { + if (annotationProgressBuilder_ == null) { + ensureAnnotationProgressIsMutable(); + annotationProgress_.add(index, builderForValue.build()); + onChanged(); + } else { + annotationProgressBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Progress metadata for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress annotation_progress = 1; + * + */ + public Builder addAllAnnotationProgress( + java.lang.Iterable< + ? extends com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress> + values) { + if (annotationProgressBuilder_ == null) { + ensureAnnotationProgressIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, annotationProgress_); + onChanged(); + } else { + annotationProgressBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Progress metadata for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress annotation_progress = 1; + * + */ + public Builder clearAnnotationProgress() { + if (annotationProgressBuilder_ == null) { + annotationProgress_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + annotationProgressBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Progress metadata for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress annotation_progress = 1; + * + */ + public Builder removeAnnotationProgress(int index) { + if (annotationProgressBuilder_ == null) { + ensureAnnotationProgressIsMutable(); + annotationProgress_.remove(index); + onChanged(); + } else { + annotationProgressBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Progress metadata for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress annotation_progress = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress.Builder + getAnnotationProgressBuilder(int index) { + return getAnnotationProgressFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Progress metadata for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress annotation_progress = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgressOrBuilder + getAnnotationProgressOrBuilder(int index) { + if (annotationProgressBuilder_ == null) { + return annotationProgress_.get(index); + } else { + return annotationProgressBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Progress metadata for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress annotation_progress = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgressOrBuilder> + getAnnotationProgressOrBuilderList() { + if (annotationProgressBuilder_ != null) { + return annotationProgressBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(annotationProgress_); + } + } + /** + * + * + *
+     * Progress metadata for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress annotation_progress = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress.Builder + addAnnotationProgressBuilder() { + return getAnnotationProgressFieldBuilder() + .addBuilder( + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress + .getDefaultInstance()); + } + /** + * + * + *
+     * Progress metadata for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress annotation_progress = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress.Builder + addAnnotationProgressBuilder(int index) { + return getAnnotationProgressFieldBuilder() + .addBuilder( + index, + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress + .getDefaultInstance()); + } + /** + * + * + *
+     * Progress metadata for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress annotation_progress = 1; + * + */ + public java.util.List< + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress.Builder> + getAnnotationProgressBuilderList() { + return getAnnotationProgressFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress, + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress.Builder, + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgressOrBuilder> + getAnnotationProgressFieldBuilder() { + if (annotationProgressBuilder_ == null) { + annotationProgressBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress, + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress.Builder, + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgressOrBuilder>( + annotationProgress_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + annotationProgress_ = null; + } + return annotationProgressBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress) + private static final com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotateVideoProgress parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnnotateVideoProgress(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/AnnotateVideoProgressOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/AnnotateVideoProgressOrBuilder.java new file mode 100644 index 000000000000..d5c702898d9b --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/AnnotateVideoProgressOrBuilder.java @@ -0,0 +1,76 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface AnnotateVideoProgressOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Progress metadata for all videos specified in `AnnotateVideoRequest`.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress annotation_progress = 1; + * + */ + java.util.List + getAnnotationProgressList(); + /** + * + * + *
+   * Progress metadata for all videos specified in `AnnotateVideoRequest`.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress annotation_progress = 1; + * + */ + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress getAnnotationProgress( + int index); + /** + * + * + *
+   * Progress metadata for all videos specified in `AnnotateVideoRequest`.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress annotation_progress = 1; + * + */ + int getAnnotationProgressCount(); + /** + * + * + *
+   * Progress metadata for all videos specified in `AnnotateVideoRequest`.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress annotation_progress = 1; + * + */ + java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgressOrBuilder> + getAnnotationProgressOrBuilderList(); + /** + * + * + *
+   * Progress metadata for all videos specified in `AnnotateVideoRequest`.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress annotation_progress = 1; + * + */ + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgressOrBuilder + getAnnotationProgressOrBuilder(int index); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/AnnotateVideoRequest.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/AnnotateVideoRequest.java new file mode 100644 index 000000000000..fd0bc4192263 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/AnnotateVideoRequest.java @@ -0,0 +1,1754 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Video annotation request.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest} + */ +public final class AnnotateVideoRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest) + AnnotateVideoRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnnotateVideoRequest.newBuilder() to construct. + private AnnotateVideoRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnnotateVideoRequest() { + inputUri_ = ""; + inputContent_ = com.google.protobuf.ByteString.EMPTY; + features_ = java.util.Collections.emptyList(); + outputUri_ = ""; + locationId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AnnotateVideoRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + inputUri_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + features_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + features_.add(rawValue); + break; + } + case 18: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + features_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + features_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + case 26: + { + com.google.cloud.videointelligence.v1p3beta1.VideoContext.Builder subBuilder = null; + if (videoContext_ != null) { + subBuilder = videoContext_.toBuilder(); + } + videoContext_ = + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.VideoContext.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(videoContext_); + videoContext_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + outputUri_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + locationId_ = s; + break; + } + case 50: + { + inputContent_ = input.readBytes(); + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + features_ = java.util.Collections.unmodifiableList(features_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_AnnotateVideoRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_AnnotateVideoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest.class, + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest.Builder.class); + } + + private int bitField0_; + public static final int INPUT_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object inputUri_; + /** + * + * + *
+   * Input video location. Currently, only
+   * [Google Cloud Storage](https://cloud.google.com/storage/) URIs are
+   * supported, which must be specified in the following format:
+   * `gs://bucket-id/object-id` (other URI formats return
+   * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
+   * more information, see [Request URIs](/storage/docs/reference-uris). A video
+   * URI may include wildcards in `object-id`, and thus identify multiple
+   * videos. Supported wildcards: '*' to match 0 or more characters;
+   * '?' to match 1 character. If unset, the input video should be embedded
+   * in the request as `input_content`. If set, `input_content` should be unset.
+   * 
+ * + * string input_uri = 1; + */ + public java.lang.String getInputUri() { + java.lang.Object ref = inputUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + inputUri_ = s; + return s; + } + } + /** + * + * + *
+   * Input video location. Currently, only
+   * [Google Cloud Storage](https://cloud.google.com/storage/) URIs are
+   * supported, which must be specified in the following format:
+   * `gs://bucket-id/object-id` (other URI formats return
+   * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
+   * more information, see [Request URIs](/storage/docs/reference-uris). A video
+   * URI may include wildcards in `object-id`, and thus identify multiple
+   * videos. Supported wildcards: '*' to match 0 or more characters;
+   * '?' to match 1 character. If unset, the input video should be embedded
+   * in the request as `input_content`. If set, `input_content` should be unset.
+   * 
+ * + * string input_uri = 1; + */ + public com.google.protobuf.ByteString getInputUriBytes() { + java.lang.Object ref = inputUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + inputUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INPUT_CONTENT_FIELD_NUMBER = 6; + private com.google.protobuf.ByteString inputContent_; + /** + * + * + *
+   * The video data bytes.
+   * If unset, the input video(s) should be specified via `input_uri`.
+   * If set, `input_uri` should be unset.
+   * 
+ * + * bytes input_content = 6; + */ + public com.google.protobuf.ByteString getInputContent() { + return inputContent_; + } + + public static final int FEATURES_FIELD_NUMBER = 2; + private java.util.List features_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.videointelligence.v1p3beta1.Feature> + features_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.videointelligence.v1p3beta1.Feature>() { + public com.google.cloud.videointelligence.v1p3beta1.Feature convert( + java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.cloud.videointelligence.v1p3beta1.Feature result = + com.google.cloud.videointelligence.v1p3beta1.Feature.valueOf(from); + return result == null + ? com.google.cloud.videointelligence.v1p3beta1.Feature.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+   * Requested video annotation features.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Feature features = 2; + */ + public java.util.List getFeaturesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.videointelligence.v1p3beta1.Feature>( + features_, features_converter_); + } + /** + * + * + *
+   * Requested video annotation features.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Feature features = 2; + */ + public int getFeaturesCount() { + return features_.size(); + } + /** + * + * + *
+   * Requested video annotation features.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Feature features = 2; + */ + public com.google.cloud.videointelligence.v1p3beta1.Feature getFeatures(int index) { + return features_converter_.convert(features_.get(index)); + } + /** + * + * + *
+   * Requested video annotation features.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Feature features = 2; + */ + public java.util.List getFeaturesValueList() { + return features_; + } + /** + * + * + *
+   * Requested video annotation features.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Feature features = 2; + */ + public int getFeaturesValue(int index) { + return features_.get(index); + } + + private int featuresMemoizedSerializedSize; + + public static final int VIDEO_CONTEXT_FIELD_NUMBER = 3; + private com.google.cloud.videointelligence.v1p3beta1.VideoContext videoContext_; + /** + * + * + *
+   * Additional video context and/or feature-specific parameters.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoContext video_context = 3; + */ + public boolean hasVideoContext() { + return videoContext_ != null; + } + /** + * + * + *
+   * Additional video context and/or feature-specific parameters.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoContext video_context = 3; + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoContext getVideoContext() { + return videoContext_ == null + ? com.google.cloud.videointelligence.v1p3beta1.VideoContext.getDefaultInstance() + : videoContext_; + } + /** + * + * + *
+   * Additional video context and/or feature-specific parameters.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoContext video_context = 3; + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoContextOrBuilder + getVideoContextOrBuilder() { + return getVideoContext(); + } + + public static final int OUTPUT_URI_FIELD_NUMBER = 4; + private volatile java.lang.Object outputUri_; + /** + * + * + *
+   * Optional location where the output (in JSON format) should be stored.
+   * Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
+   * URIs are supported, which must be specified in the following format:
+   * `gs://bucket-id/object-id` (other URI formats return
+   * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
+   * more information, see [Request URIs](/storage/docs/reference-uris).
+   * 
+ * + * string output_uri = 4; + */ + public java.lang.String getOutputUri() { + java.lang.Object ref = outputUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + outputUri_ = s; + return s; + } + } + /** + * + * + *
+   * Optional location where the output (in JSON format) should be stored.
+   * Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
+   * URIs are supported, which must be specified in the following format:
+   * `gs://bucket-id/object-id` (other URI formats return
+   * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
+   * more information, see [Request URIs](/storage/docs/reference-uris).
+   * 
+ * + * string output_uri = 4; + */ + public com.google.protobuf.ByteString getOutputUriBytes() { + java.lang.Object ref = outputUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_ID_FIELD_NUMBER = 5; + private volatile java.lang.Object locationId_; + /** + * + * + *
+   * Optional cloud region where annotation should take place. Supported cloud
+   * regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region
+   * is specified, a region will be determined based on video file location.
+   * 
+ * + * string location_id = 5; + */ + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional cloud region where annotation should take place. Supported cloud
+   * regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region
+   * is specified, a region will be determined based on video file location.
+   * 
+ * + * string location_id = 5; + */ + public com.google.protobuf.ByteString getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (!getInputUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, inputUri_); + } + if (getFeaturesList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(featuresMemoizedSerializedSize); + } + for (int i = 0; i < features_.size(); i++) { + output.writeEnumNoTag(features_.get(i)); + } + if (videoContext_ != null) { + output.writeMessage(3, getVideoContext()); + } + if (!getOutputUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, outputUri_); + } + if (!getLocationIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, locationId_); + } + if (!inputContent_.isEmpty()) { + output.writeBytes(6, inputContent_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getInputUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, inputUri_); + } + { + int dataSize = 0; + for (int i = 0; i < features_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(features_.get(i)); + } + size += dataSize; + if (!getFeaturesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + featuresMemoizedSerializedSize = dataSize; + } + if (videoContext_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getVideoContext()); + } + if (!getOutputUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, outputUri_); + } + if (!getLocationIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, locationId_); + } + if (!inputContent_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(6, inputContent_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest other = + (com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest) obj; + + boolean result = true; + result = result && getInputUri().equals(other.getInputUri()); + result = result && getInputContent().equals(other.getInputContent()); + result = result && features_.equals(other.features_); + result = result && (hasVideoContext() == other.hasVideoContext()); + if (hasVideoContext()) { + result = result && getVideoContext().equals(other.getVideoContext()); + } + result = result && getOutputUri().equals(other.getOutputUri()); + result = result && getLocationId().equals(other.getLocationId()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INPUT_URI_FIELD_NUMBER; + hash = (53 * hash) + getInputUri().hashCode(); + hash = (37 * hash) + INPUT_CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getInputContent().hashCode(); + if (getFeaturesCount() > 0) { + hash = (37 * hash) + FEATURES_FIELD_NUMBER; + hash = (53 * hash) + features_.hashCode(); + } + if (hasVideoContext()) { + hash = (37 * hash) + VIDEO_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getVideoContext().hashCode(); + } + hash = (37 * hash) + OUTPUT_URI_FIELD_NUMBER; + hash = (53 * hash) + getOutputUri().hashCode(); + hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getLocationId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Video annotation request.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest) + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_AnnotateVideoRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_AnnotateVideoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest.class, + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest.Builder.class); + } + + // Construct using + // com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + inputUri_ = ""; + + inputContent_ = com.google.protobuf.ByteString.EMPTY; + + features_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + if (videoContextBuilder_ == null) { + videoContext_ = null; + } else { + videoContext_ = null; + videoContextBuilder_ = null; + } + outputUri_ = ""; + + locationId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_AnnotateVideoRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest + getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest build() { + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest result = + new com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.inputUri_ = inputUri_; + result.inputContent_ = inputContent_; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + features_ = java.util.Collections.unmodifiableList(features_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.features_ = features_; + if (videoContextBuilder_ == null) { + result.videoContext_ = videoContext_; + } else { + result.videoContext_ = videoContextBuilder_.build(); + } + result.outputUri_ = outputUri_; + result.locationId_ = locationId_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest) { + return mergeFrom((com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest other) { + if (other + == com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest.getDefaultInstance()) + return this; + if (!other.getInputUri().isEmpty()) { + inputUri_ = other.inputUri_; + onChanged(); + } + if (other.getInputContent() != com.google.protobuf.ByteString.EMPTY) { + setInputContent(other.getInputContent()); + } + if (!other.features_.isEmpty()) { + if (features_.isEmpty()) { + features_ = other.features_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureFeaturesIsMutable(); + features_.addAll(other.features_); + } + onChanged(); + } + if (other.hasVideoContext()) { + mergeVideoContext(other.getVideoContext()); + } + if (!other.getOutputUri().isEmpty()) { + outputUri_ = other.outputUri_; + onChanged(); + } + if (!other.getLocationId().isEmpty()) { + locationId_ = other.locationId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object inputUri_ = ""; + /** + * + * + *
+     * Input video location. Currently, only
+     * [Google Cloud Storage](https://cloud.google.com/storage/) URIs are
+     * supported, which must be specified in the following format:
+     * `gs://bucket-id/object-id` (other URI formats return
+     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
+     * more information, see [Request URIs](/storage/docs/reference-uris). A video
+     * URI may include wildcards in `object-id`, and thus identify multiple
+     * videos. Supported wildcards: '*' to match 0 or more characters;
+     * '?' to match 1 character. If unset, the input video should be embedded
+     * in the request as `input_content`. If set, `input_content` should be unset.
+     * 
+ * + * string input_uri = 1; + */ + public java.lang.String getInputUri() { + java.lang.Object ref = inputUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + inputUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Input video location. Currently, only
+     * [Google Cloud Storage](https://cloud.google.com/storage/) URIs are
+     * supported, which must be specified in the following format:
+     * `gs://bucket-id/object-id` (other URI formats return
+     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
+     * more information, see [Request URIs](/storage/docs/reference-uris). A video
+     * URI may include wildcards in `object-id`, and thus identify multiple
+     * videos. Supported wildcards: '*' to match 0 or more characters;
+     * '?' to match 1 character. If unset, the input video should be embedded
+     * in the request as `input_content`. If set, `input_content` should be unset.
+     * 
+ * + * string input_uri = 1; + */ + public com.google.protobuf.ByteString getInputUriBytes() { + java.lang.Object ref = inputUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + inputUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Input video location. Currently, only
+     * [Google Cloud Storage](https://cloud.google.com/storage/) URIs are
+     * supported, which must be specified in the following format:
+     * `gs://bucket-id/object-id` (other URI formats return
+     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
+     * more information, see [Request URIs](/storage/docs/reference-uris). A video
+     * URI may include wildcards in `object-id`, and thus identify multiple
+     * videos. Supported wildcards: '*' to match 0 or more characters;
+     * '?' to match 1 character. If unset, the input video should be embedded
+     * in the request as `input_content`. If set, `input_content` should be unset.
+     * 
+ * + * string input_uri = 1; + */ + public Builder setInputUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + inputUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Input video location. Currently, only
+     * [Google Cloud Storage](https://cloud.google.com/storage/) URIs are
+     * supported, which must be specified in the following format:
+     * `gs://bucket-id/object-id` (other URI formats return
+     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
+     * more information, see [Request URIs](/storage/docs/reference-uris). A video
+     * URI may include wildcards in `object-id`, and thus identify multiple
+     * videos. Supported wildcards: '*' to match 0 or more characters;
+     * '?' to match 1 character. If unset, the input video should be embedded
+     * in the request as `input_content`. If set, `input_content` should be unset.
+     * 
+ * + * string input_uri = 1; + */ + public Builder clearInputUri() { + + inputUri_ = getDefaultInstance().getInputUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Input video location. Currently, only
+     * [Google Cloud Storage](https://cloud.google.com/storage/) URIs are
+     * supported, which must be specified in the following format:
+     * `gs://bucket-id/object-id` (other URI formats return
+     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
+     * more information, see [Request URIs](/storage/docs/reference-uris). A video
+     * URI may include wildcards in `object-id`, and thus identify multiple
+     * videos. Supported wildcards: '*' to match 0 or more characters;
+     * '?' to match 1 character. If unset, the input video should be embedded
+     * in the request as `input_content`. If set, `input_content` should be unset.
+     * 
+ * + * string input_uri = 1; + */ + public Builder setInputUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + inputUri_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString inputContent_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+     * The video data bytes.
+     * If unset, the input video(s) should be specified via `input_uri`.
+     * If set, `input_uri` should be unset.
+     * 
+ * + * bytes input_content = 6; + */ + public com.google.protobuf.ByteString getInputContent() { + return inputContent_; + } + /** + * + * + *
+     * The video data bytes.
+     * If unset, the input video(s) should be specified via `input_uri`.
+     * If set, `input_uri` should be unset.
+     * 
+ * + * bytes input_content = 6; + */ + public Builder setInputContent(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + inputContent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The video data bytes.
+     * If unset, the input video(s) should be specified via `input_uri`.
+     * If set, `input_uri` should be unset.
+     * 
+ * + * bytes input_content = 6; + */ + public Builder clearInputContent() { + + inputContent_ = getDefaultInstance().getInputContent(); + onChanged(); + return this; + } + + private java.util.List features_ = java.util.Collections.emptyList(); + + private void ensureFeaturesIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + features_ = new java.util.ArrayList(features_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
+     * Requested video annotation features.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Feature features = 2; + */ + public java.util.List getFeaturesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.videointelligence.v1p3beta1.Feature>( + features_, features_converter_); + } + /** + * + * + *
+     * Requested video annotation features.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Feature features = 2; + */ + public int getFeaturesCount() { + return features_.size(); + } + /** + * + * + *
+     * Requested video annotation features.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Feature features = 2; + */ + public com.google.cloud.videointelligence.v1p3beta1.Feature getFeatures(int index) { + return features_converter_.convert(features_.get(index)); + } + /** + * + * + *
+     * Requested video annotation features.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Feature features = 2; + */ + public Builder setFeatures( + int index, com.google.cloud.videointelligence.v1p3beta1.Feature value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Requested video annotation features.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Feature features = 2; + */ + public Builder addFeatures(com.google.cloud.videointelligence.v1p3beta1.Feature value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Requested video annotation features.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Feature features = 2; + */ + public Builder addAllFeatures( + java.lang.Iterable values) { + ensureFeaturesIsMutable(); + for (com.google.cloud.videointelligence.v1p3beta1.Feature value : values) { + features_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * Requested video annotation features.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Feature features = 2; + */ + public Builder clearFeatures() { + features_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Requested video annotation features.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Feature features = 2; + */ + public java.util.List getFeaturesValueList() { + return java.util.Collections.unmodifiableList(features_); + } + /** + * + * + *
+     * Requested video annotation features.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Feature features = 2; + */ + public int getFeaturesValue(int index) { + return features_.get(index); + } + /** + * + * + *
+     * Requested video annotation features.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Feature features = 2; + */ + public Builder setFeaturesValue(int index, int value) { + ensureFeaturesIsMutable(); + features_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Requested video annotation features.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Feature features = 2; + */ + public Builder addFeaturesValue(int value) { + ensureFeaturesIsMutable(); + features_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Requested video annotation features.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Feature features = 2; + */ + public Builder addAllFeaturesValue(java.lang.Iterable values) { + ensureFeaturesIsMutable(); + for (int value : values) { + features_.add(value); + } + onChanged(); + return this; + } + + private com.google.cloud.videointelligence.v1p3beta1.VideoContext videoContext_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.VideoContext, + com.google.cloud.videointelligence.v1p3beta1.VideoContext.Builder, + com.google.cloud.videointelligence.v1p3beta1.VideoContextOrBuilder> + videoContextBuilder_; + /** + * + * + *
+     * Additional video context and/or feature-specific parameters.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoContext video_context = 3; + */ + public boolean hasVideoContext() { + return videoContextBuilder_ != null || videoContext_ != null; + } + /** + * + * + *
+     * Additional video context and/or feature-specific parameters.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoContext video_context = 3; + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoContext getVideoContext() { + if (videoContextBuilder_ == null) { + return videoContext_ == null + ? com.google.cloud.videointelligence.v1p3beta1.VideoContext.getDefaultInstance() + : videoContext_; + } else { + return videoContextBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Additional video context and/or feature-specific parameters.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoContext video_context = 3; + */ + public Builder setVideoContext( + com.google.cloud.videointelligence.v1p3beta1.VideoContext value) { + if (videoContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + videoContext_ = value; + onChanged(); + } else { + videoContextBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Additional video context and/or feature-specific parameters.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoContext video_context = 3; + */ + public Builder setVideoContext( + com.google.cloud.videointelligence.v1p3beta1.VideoContext.Builder builderForValue) { + if (videoContextBuilder_ == null) { + videoContext_ = builderForValue.build(); + onChanged(); + } else { + videoContextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Additional video context and/or feature-specific parameters.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoContext video_context = 3; + */ + public Builder mergeVideoContext( + com.google.cloud.videointelligence.v1p3beta1.VideoContext value) { + if (videoContextBuilder_ == null) { + if (videoContext_ != null) { + videoContext_ = + com.google.cloud.videointelligence.v1p3beta1.VideoContext.newBuilder(videoContext_) + .mergeFrom(value) + .buildPartial(); + } else { + videoContext_ = value; + } + onChanged(); + } else { + videoContextBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Additional video context and/or feature-specific parameters.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoContext video_context = 3; + */ + public Builder clearVideoContext() { + if (videoContextBuilder_ == null) { + videoContext_ = null; + onChanged(); + } else { + videoContext_ = null; + videoContextBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Additional video context and/or feature-specific parameters.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoContext video_context = 3; + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoContext.Builder + getVideoContextBuilder() { + + onChanged(); + return getVideoContextFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Additional video context and/or feature-specific parameters.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoContext video_context = 3; + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoContextOrBuilder + getVideoContextOrBuilder() { + if (videoContextBuilder_ != null) { + return videoContextBuilder_.getMessageOrBuilder(); + } else { + return videoContext_ == null + ? com.google.cloud.videointelligence.v1p3beta1.VideoContext.getDefaultInstance() + : videoContext_; + } + } + /** + * + * + *
+     * Additional video context and/or feature-specific parameters.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoContext video_context = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.VideoContext, + com.google.cloud.videointelligence.v1p3beta1.VideoContext.Builder, + com.google.cloud.videointelligence.v1p3beta1.VideoContextOrBuilder> + getVideoContextFieldBuilder() { + if (videoContextBuilder_ == null) { + videoContextBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.VideoContext, + com.google.cloud.videointelligence.v1p3beta1.VideoContext.Builder, + com.google.cloud.videointelligence.v1p3beta1.VideoContextOrBuilder>( + getVideoContext(), getParentForChildren(), isClean()); + videoContext_ = null; + } + return videoContextBuilder_; + } + + private java.lang.Object outputUri_ = ""; + /** + * + * + *
+     * Optional location where the output (in JSON format) should be stored.
+     * Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
+     * URIs are supported, which must be specified in the following format:
+     * `gs://bucket-id/object-id` (other URI formats return
+     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
+     * more information, see [Request URIs](/storage/docs/reference-uris).
+     * 
+ * + * string output_uri = 4; + */ + public java.lang.String getOutputUri() { + java.lang.Object ref = outputUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + outputUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional location where the output (in JSON format) should be stored.
+     * Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
+     * URIs are supported, which must be specified in the following format:
+     * `gs://bucket-id/object-id` (other URI formats return
+     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
+     * more information, see [Request URIs](/storage/docs/reference-uris).
+     * 
+ * + * string output_uri = 4; + */ + public com.google.protobuf.ByteString getOutputUriBytes() { + java.lang.Object ref = outputUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional location where the output (in JSON format) should be stored.
+     * Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
+     * URIs are supported, which must be specified in the following format:
+     * `gs://bucket-id/object-id` (other URI formats return
+     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
+     * more information, see [Request URIs](/storage/docs/reference-uris).
+     * 
+ * + * string output_uri = 4; + */ + public Builder setOutputUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + outputUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional location where the output (in JSON format) should be stored.
+     * Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
+     * URIs are supported, which must be specified in the following format:
+     * `gs://bucket-id/object-id` (other URI formats return
+     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
+     * more information, see [Request URIs](/storage/docs/reference-uris).
+     * 
+ * + * string output_uri = 4; + */ + public Builder clearOutputUri() { + + outputUri_ = getDefaultInstance().getOutputUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional location where the output (in JSON format) should be stored.
+     * Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
+     * URIs are supported, which must be specified in the following format:
+     * `gs://bucket-id/object-id` (other URI formats return
+     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
+     * more information, see [Request URIs](/storage/docs/reference-uris).
+     * 
+ * + * string output_uri = 4; + */ + public Builder setOutputUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + outputUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object locationId_ = ""; + /** + * + * + *
+     * Optional cloud region where annotation should take place. Supported cloud
+     * regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region
+     * is specified, a region will be determined based on video file location.
+     * 
+ * + * string location_id = 5; + */ + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional cloud region where annotation should take place. Supported cloud
+     * regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region
+     * is specified, a region will be determined based on video file location.
+     * 
+ * + * string location_id = 5; + */ + public com.google.protobuf.ByteString getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional cloud region where annotation should take place. Supported cloud
+     * regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region
+     * is specified, a region will be determined based on video file location.
+     * 
+ * + * string location_id = 5; + */ + public Builder setLocationId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + locationId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional cloud region where annotation should take place. Supported cloud
+     * regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region
+     * is specified, a region will be determined based on video file location.
+     * 
+ * + * string location_id = 5; + */ + public Builder clearLocationId() { + + locationId_ = getDefaultInstance().getLocationId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional cloud region where annotation should take place. Supported cloud
+     * regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region
+     * is specified, a region will be determined based on video file location.
+     * 
+ * + * string location_id = 5; + */ + public Builder setLocationIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + locationId_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest) + private static final com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotateVideoRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnnotateVideoRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/AnnotateVideoRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/AnnotateVideoRequestOrBuilder.java new file mode 100644 index 000000000000..6b2f71c00784 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/AnnotateVideoRequestOrBuilder.java @@ -0,0 +1,200 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface AnnotateVideoRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Input video location. Currently, only
+   * [Google Cloud Storage](https://cloud.google.com/storage/) URIs are
+   * supported, which must be specified in the following format:
+   * `gs://bucket-id/object-id` (other URI formats return
+   * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
+   * more information, see [Request URIs](/storage/docs/reference-uris). A video
+   * URI may include wildcards in `object-id`, and thus identify multiple
+   * videos. Supported wildcards: '*' to match 0 or more characters;
+   * '?' to match 1 character. If unset, the input video should be embedded
+   * in the request as `input_content`. If set, `input_content` should be unset.
+   * 
+ * + * string input_uri = 1; + */ + java.lang.String getInputUri(); + /** + * + * + *
+   * Input video location. Currently, only
+   * [Google Cloud Storage](https://cloud.google.com/storage/) URIs are
+   * supported, which must be specified in the following format:
+   * `gs://bucket-id/object-id` (other URI formats return
+   * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
+   * more information, see [Request URIs](/storage/docs/reference-uris). A video
+   * URI may include wildcards in `object-id`, and thus identify multiple
+   * videos. Supported wildcards: '*' to match 0 or more characters;
+   * '?' to match 1 character. If unset, the input video should be embedded
+   * in the request as `input_content`. If set, `input_content` should be unset.
+   * 
+ * + * string input_uri = 1; + */ + com.google.protobuf.ByteString getInputUriBytes(); + + /** + * + * + *
+   * The video data bytes.
+   * If unset, the input video(s) should be specified via `input_uri`.
+   * If set, `input_uri` should be unset.
+   * 
+ * + * bytes input_content = 6; + */ + com.google.protobuf.ByteString getInputContent(); + + /** + * + * + *
+   * Requested video annotation features.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Feature features = 2; + */ + java.util.List getFeaturesList(); + /** + * + * + *
+   * Requested video annotation features.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Feature features = 2; + */ + int getFeaturesCount(); + /** + * + * + *
+   * Requested video annotation features.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Feature features = 2; + */ + com.google.cloud.videointelligence.v1p3beta1.Feature getFeatures(int index); + /** + * + * + *
+   * Requested video annotation features.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Feature features = 2; + */ + java.util.List getFeaturesValueList(); + /** + * + * + *
+   * Requested video annotation features.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Feature features = 2; + */ + int getFeaturesValue(int index); + + /** + * + * + *
+   * Additional video context and/or feature-specific parameters.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoContext video_context = 3; + */ + boolean hasVideoContext(); + /** + * + * + *
+   * Additional video context and/or feature-specific parameters.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoContext video_context = 3; + */ + com.google.cloud.videointelligence.v1p3beta1.VideoContext getVideoContext(); + /** + * + * + *
+   * Additional video context and/or feature-specific parameters.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoContext video_context = 3; + */ + com.google.cloud.videointelligence.v1p3beta1.VideoContextOrBuilder getVideoContextOrBuilder(); + + /** + * + * + *
+   * Optional location where the output (in JSON format) should be stored.
+   * Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
+   * URIs are supported, which must be specified in the following format:
+   * `gs://bucket-id/object-id` (other URI formats return
+   * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
+   * more information, see [Request URIs](/storage/docs/reference-uris).
+   * 
+ * + * string output_uri = 4; + */ + java.lang.String getOutputUri(); + /** + * + * + *
+   * Optional location where the output (in JSON format) should be stored.
+   * Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
+   * URIs are supported, which must be specified in the following format:
+   * `gs://bucket-id/object-id` (other URI formats return
+   * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
+   * more information, see [Request URIs](/storage/docs/reference-uris).
+   * 
+ * + * string output_uri = 4; + */ + com.google.protobuf.ByteString getOutputUriBytes(); + + /** + * + * + *
+   * Optional cloud region where annotation should take place. Supported cloud
+   * regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region
+   * is specified, a region will be determined based on video file location.
+   * 
+ * + * string location_id = 5; + */ + java.lang.String getLocationId(); + /** + * + * + *
+   * Optional cloud region where annotation should take place. Supported cloud
+   * regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region
+   * is specified, a region will be determined based on video file location.
+   * 
+ * + * string location_id = 5; + */ + com.google.protobuf.ByteString getLocationIdBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/AnnotateVideoResponse.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/AnnotateVideoResponse.java new file mode 100644 index 000000000000..6589d08cc00c --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/AnnotateVideoResponse.java @@ -0,0 +1,1025 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Video annotation response. Included in the `response`
+ * field of the `Operation` returned by the `GetOperation`
+ * call of the `google::longrunning::Operations` service.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse} + */ +public final class AnnotateVideoResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse) + AnnotateVideoResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnnotateVideoResponse.newBuilder() to construct. + private AnnotateVideoResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnnotateVideoResponse() { + annotationResults_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AnnotateVideoResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + annotationResults_ = + new java.util.ArrayList< + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults>(); + mutable_bitField0_ |= 0x00000001; + } + annotationResults_.add( + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + annotationResults_ = java.util.Collections.unmodifiableList(annotationResults_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_AnnotateVideoResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_AnnotateVideoResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse.class, + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse.Builder.class); + } + + public static final int ANNOTATION_RESULTS_FIELD_NUMBER = 1; + private java.util.List + annotationResults_; + /** + * + * + *
+   * Annotation results for all videos specified in `AnnotateVideoRequest`.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults annotation_results = 1; + * + */ + public java.util.List + getAnnotationResultsList() { + return annotationResults_; + } + /** + * + * + *
+   * Annotation results for all videos specified in `AnnotateVideoRequest`.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults annotation_results = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResultsOrBuilder> + getAnnotationResultsOrBuilderList() { + return annotationResults_; + } + /** + * + * + *
+   * Annotation results for all videos specified in `AnnotateVideoRequest`.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults annotation_results = 1; + * + */ + public int getAnnotationResultsCount() { + return annotationResults_.size(); + } + /** + * + * + *
+   * Annotation results for all videos specified in `AnnotateVideoRequest`.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults annotation_results = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults getAnnotationResults( + int index) { + return annotationResults_.get(index); + } + /** + * + * + *
+   * Annotation results for all videos specified in `AnnotateVideoRequest`.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults annotation_results = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResultsOrBuilder + getAnnotationResultsOrBuilder(int index) { + return annotationResults_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < annotationResults_.size(); i++) { + output.writeMessage(1, annotationResults_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < annotationResults_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, annotationResults_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse other = + (com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse) obj; + + boolean result = true; + result = result && getAnnotationResultsList().equals(other.getAnnotationResultsList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAnnotationResultsCount() > 0) { + hash = (37 * hash) + ANNOTATION_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationResultsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Video annotation response. Included in the `response`
+   * field of the `Operation` returned by the `GetOperation`
+   * call of the `google::longrunning::Operations` service.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse) + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_AnnotateVideoResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_AnnotateVideoResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse.class, + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse.Builder.class); + } + + // Construct using + // com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAnnotationResultsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (annotationResultsBuilder_ == null) { + annotationResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + annotationResultsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_AnnotateVideoResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse + getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse build() { + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse result = + new com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse(this); + int from_bitField0_ = bitField0_; + if (annotationResultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + annotationResults_ = java.util.Collections.unmodifiableList(annotationResults_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.annotationResults_ = annotationResults_; + } else { + result.annotationResults_ = annotationResultsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse) { + return mergeFrom( + (com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse other) { + if (other + == com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse + .getDefaultInstance()) return this; + if (annotationResultsBuilder_ == null) { + if (!other.annotationResults_.isEmpty()) { + if (annotationResults_.isEmpty()) { + annotationResults_ = other.annotationResults_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAnnotationResultsIsMutable(); + annotationResults_.addAll(other.annotationResults_); + } + onChanged(); + } + } else { + if (!other.annotationResults_.isEmpty()) { + if (annotationResultsBuilder_.isEmpty()) { + annotationResultsBuilder_.dispose(); + annotationResultsBuilder_ = null; + annotationResults_ = other.annotationResults_; + bitField0_ = (bitField0_ & ~0x00000001); + annotationResultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAnnotationResultsFieldBuilder() + : null; + } else { + annotationResultsBuilder_.addAllMessages(other.annotationResults_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + annotationResults_ = java.util.Collections.emptyList(); + + private void ensureAnnotationResultsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + annotationResults_ = + new java.util.ArrayList< + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults>( + annotationResults_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults, + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults.Builder, + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResultsOrBuilder> + annotationResultsBuilder_; + + /** + * + * + *
+     * Annotation results for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults annotation_results = 1; + * + */ + public java.util.List + getAnnotationResultsList() { + if (annotationResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(annotationResults_); + } else { + return annotationResultsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Annotation results for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults annotation_results = 1; + * + */ + public int getAnnotationResultsCount() { + if (annotationResultsBuilder_ == null) { + return annotationResults_.size(); + } else { + return annotationResultsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Annotation results for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults annotation_results = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults getAnnotationResults( + int index) { + if (annotationResultsBuilder_ == null) { + return annotationResults_.get(index); + } else { + return annotationResultsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Annotation results for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults annotation_results = 1; + * + */ + public Builder setAnnotationResults( + int index, com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults value) { + if (annotationResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationResultsIsMutable(); + annotationResults_.set(index, value); + onChanged(); + } else { + annotationResultsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Annotation results for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults annotation_results = 1; + * + */ + public Builder setAnnotationResults( + int index, + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults.Builder + builderForValue) { + if (annotationResultsBuilder_ == null) { + ensureAnnotationResultsIsMutable(); + annotationResults_.set(index, builderForValue.build()); + onChanged(); + } else { + annotationResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Annotation results for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults annotation_results = 1; + * + */ + public Builder addAnnotationResults( + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults value) { + if (annotationResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationResultsIsMutable(); + annotationResults_.add(value); + onChanged(); + } else { + annotationResultsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Annotation results for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults annotation_results = 1; + * + */ + public Builder addAnnotationResults( + int index, com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults value) { + if (annotationResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationResultsIsMutable(); + annotationResults_.add(index, value); + onChanged(); + } else { + annotationResultsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Annotation results for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults annotation_results = 1; + * + */ + public Builder addAnnotationResults( + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults.Builder + builderForValue) { + if (annotationResultsBuilder_ == null) { + ensureAnnotationResultsIsMutable(); + annotationResults_.add(builderForValue.build()); + onChanged(); + } else { + annotationResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Annotation results for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults annotation_results = 1; + * + */ + public Builder addAnnotationResults( + int index, + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults.Builder + builderForValue) { + if (annotationResultsBuilder_ == null) { + ensureAnnotationResultsIsMutable(); + annotationResults_.add(index, builderForValue.build()); + onChanged(); + } else { + annotationResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Annotation results for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults annotation_results = 1; + * + */ + public Builder addAllAnnotationResults( + java.lang.Iterable< + ? extends com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults> + values) { + if (annotationResultsBuilder_ == null) { + ensureAnnotationResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, annotationResults_); + onChanged(); + } else { + annotationResultsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Annotation results for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults annotation_results = 1; + * + */ + public Builder clearAnnotationResults() { + if (annotationResultsBuilder_ == null) { + annotationResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + annotationResultsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Annotation results for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults annotation_results = 1; + * + */ + public Builder removeAnnotationResults(int index) { + if (annotationResultsBuilder_ == null) { + ensureAnnotationResultsIsMutable(); + annotationResults_.remove(index); + onChanged(); + } else { + annotationResultsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Annotation results for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults annotation_results = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults.Builder + getAnnotationResultsBuilder(int index) { + return getAnnotationResultsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Annotation results for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults annotation_results = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResultsOrBuilder + getAnnotationResultsOrBuilder(int index) { + if (annotationResultsBuilder_ == null) { + return annotationResults_.get(index); + } else { + return annotationResultsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Annotation results for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults annotation_results = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResultsOrBuilder> + getAnnotationResultsOrBuilderList() { + if (annotationResultsBuilder_ != null) { + return annotationResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(annotationResults_); + } + } + /** + * + * + *
+     * Annotation results for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults annotation_results = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults.Builder + addAnnotationResultsBuilder() { + return getAnnotationResultsFieldBuilder() + .addBuilder( + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults + .getDefaultInstance()); + } + /** + * + * + *
+     * Annotation results for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults annotation_results = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults.Builder + addAnnotationResultsBuilder(int index) { + return getAnnotationResultsFieldBuilder() + .addBuilder( + index, + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults + .getDefaultInstance()); + } + /** + * + * + *
+     * Annotation results for all videos specified in `AnnotateVideoRequest`.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults annotation_results = 1; + * + */ + public java.util.List< + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults.Builder> + getAnnotationResultsBuilderList() { + return getAnnotationResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults, + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults.Builder, + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResultsOrBuilder> + getAnnotationResultsFieldBuilder() { + if (annotationResultsBuilder_ == null) { + annotationResultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults, + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults.Builder, + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResultsOrBuilder>( + annotationResults_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + annotationResults_ = null; + } + return annotationResultsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse) + private static final com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotateVideoResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnnotateVideoResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/AnnotateVideoResponseOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/AnnotateVideoResponseOrBuilder.java new file mode 100644 index 000000000000..13f69ead06a6 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/AnnotateVideoResponseOrBuilder.java @@ -0,0 +1,76 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface AnnotateVideoResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Annotation results for all videos specified in `AnnotateVideoRequest`.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults annotation_results = 1; + * + */ + java.util.List + getAnnotationResultsList(); + /** + * + * + *
+   * Annotation results for all videos specified in `AnnotateVideoRequest`.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults annotation_results = 1; + * + */ + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults getAnnotationResults( + int index); + /** + * + * + *
+   * Annotation results for all videos specified in `AnnotateVideoRequest`.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults annotation_results = 1; + * + */ + int getAnnotationResultsCount(); + /** + * + * + *
+   * Annotation results for all videos specified in `AnnotateVideoRequest`.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults annotation_results = 1; + * + */ + java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResultsOrBuilder> + getAnnotationResultsOrBuilderList(); + /** + * + * + *
+   * Annotation results for all videos specified in `AnnotateVideoRequest`.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults annotation_results = 1; + * + */ + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResultsOrBuilder + getAnnotationResultsOrBuilder(int index); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/Entity.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/Entity.java new file mode 100644 index 000000000000..088bf998db2e --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/Entity.java @@ -0,0 +1,935 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Detected entity from video analysis.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.Entity} + */ +public final class Entity extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.Entity) + EntityOrBuilder { + private static final long serialVersionUID = 0L; + // Use Entity.newBuilder() to construct. + private Entity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Entity() { + entityId_ = ""; + description_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Entity( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + entityId_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_Entity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_Entity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.Entity.class, + com.google.cloud.videointelligence.v1p3beta1.Entity.Builder.class); + } + + public static final int ENTITY_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object entityId_; + /** + * + * + *
+   * Opaque entity ID. Some IDs may be available in
+   * [Google Knowledge Graph Search
+   * API](https://developers.google.com/knowledge-graph/).
+   * 
+ * + * string entity_id = 1; + */ + public java.lang.String getEntityId() { + java.lang.Object ref = entityId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entityId_ = s; + return s; + } + } + /** + * + * + *
+   * Opaque entity ID. Some IDs may be available in
+   * [Google Knowledge Graph Search
+   * API](https://developers.google.com/knowledge-graph/).
+   * 
+ * + * string entity_id = 1; + */ + public com.google.protobuf.ByteString getEntityIdBytes() { + java.lang.Object ref = entityId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + entityId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Textual description, e.g. `Fixed-gear bicycle`.
+   * 
+ * + * string description = 2; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Textual description, e.g. `Fixed-gear bicycle`.
+   * 
+ * + * string description = 2; + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 3; + private volatile java.lang.Object languageCode_; + /** + * + * + *
+   * Language code for `description` in BCP-47 format.
+   * 
+ * + * string language_code = 3; + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * Language code for `description` in BCP-47 format.
+   * 
+ * + * string language_code = 3; + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getEntityIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, entityId_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (!getLanguageCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, languageCode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getEntityIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, entityId_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (!getLanguageCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, languageCode_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.videointelligence.v1p3beta1.Entity)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.Entity other = + (com.google.cloud.videointelligence.v1p3beta1.Entity) obj; + + boolean result = true; + result = result && getEntityId().equals(other.getEntityId()); + result = result && getDescription().equals(other.getDescription()); + result = result && getLanguageCode().equals(other.getLanguageCode()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENTITY_ID_FIELD_NUMBER; + hash = (53 * hash) + getEntityId().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.Entity parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.Entity parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.Entity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.Entity parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.Entity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.Entity parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.Entity parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.Entity parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.Entity parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.Entity parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.Entity parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.Entity parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.videointelligence.v1p3beta1.Entity prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Detected entity from video analysis.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.Entity} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.Entity) + com.google.cloud.videointelligence.v1p3beta1.EntityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_Entity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_Entity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.Entity.class, + com.google.cloud.videointelligence.v1p3beta1.Entity.Builder.class); + } + + // Construct using com.google.cloud.videointelligence.v1p3beta1.Entity.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + entityId_ = ""; + + description_ = ""; + + languageCode_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_Entity_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.Entity getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.Entity.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.Entity build() { + com.google.cloud.videointelligence.v1p3beta1.Entity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.Entity buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.Entity result = + new com.google.cloud.videointelligence.v1p3beta1.Entity(this); + result.entityId_ = entityId_; + result.description_ = description_; + result.languageCode_ = languageCode_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.videointelligence.v1p3beta1.Entity) { + return mergeFrom((com.google.cloud.videointelligence.v1p3beta1.Entity) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.videointelligence.v1p3beta1.Entity other) { + if (other == com.google.cloud.videointelligence.v1p3beta1.Entity.getDefaultInstance()) + return this; + if (!other.getEntityId().isEmpty()) { + entityId_ = other.entityId_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.Entity parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.Entity) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object entityId_ = ""; + /** + * + * + *
+     * Opaque entity ID. Some IDs may be available in
+     * [Google Knowledge Graph Search
+     * API](https://developers.google.com/knowledge-graph/).
+     * 
+ * + * string entity_id = 1; + */ + public java.lang.String getEntityId() { + java.lang.Object ref = entityId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entityId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Opaque entity ID. Some IDs may be available in
+     * [Google Knowledge Graph Search
+     * API](https://developers.google.com/knowledge-graph/).
+     * 
+ * + * string entity_id = 1; + */ + public com.google.protobuf.ByteString getEntityIdBytes() { + java.lang.Object ref = entityId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + entityId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Opaque entity ID. Some IDs may be available in
+     * [Google Knowledge Graph Search
+     * API](https://developers.google.com/knowledge-graph/).
+     * 
+ * + * string entity_id = 1; + */ + public Builder setEntityId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + entityId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Opaque entity ID. Some IDs may be available in
+     * [Google Knowledge Graph Search
+     * API](https://developers.google.com/knowledge-graph/).
+     * 
+ * + * string entity_id = 1; + */ + public Builder clearEntityId() { + + entityId_ = getDefaultInstance().getEntityId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Opaque entity ID. Some IDs may be available in
+     * [Google Knowledge Graph Search
+     * API](https://developers.google.com/knowledge-graph/).
+     * 
+ * + * string entity_id = 1; + */ + public Builder setEntityIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + entityId_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Textual description, e.g. `Fixed-gear bicycle`.
+     * 
+ * + * string description = 2; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Textual description, e.g. `Fixed-gear bicycle`.
+     * 
+ * + * string description = 2; + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Textual description, e.g. `Fixed-gear bicycle`.
+     * 
+ * + * string description = 2; + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Textual description, e.g. `Fixed-gear bicycle`.
+     * 
+ * + * string description = 2; + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Textual description, e.g. `Fixed-gear bicycle`.
+     * 
+ * + * string description = 2; + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * Language code for `description` in BCP-47 format.
+     * 
+ * + * string language_code = 3; + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Language code for `description` in BCP-47 format.
+     * 
+ * + * string language_code = 3; + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Language code for `description` in BCP-47 format.
+     * 
+ * + * string language_code = 3; + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Language code for `description` in BCP-47 format.
+     * 
+ * + * string language_code = 3; + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * Language code for `description` in BCP-47 format.
+     * 
+ * + * string language_code = 3; + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.Entity) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.Entity) + private static final com.google.cloud.videointelligence.v1p3beta1.Entity DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.videointelligence.v1p3beta1.Entity(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.Entity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Entity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Entity(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.Entity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/EntityOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/EntityOrBuilder.java new file mode 100644 index 000000000000..92ef7893c478 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/EntityOrBuilder.java @@ -0,0 +1,77 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface EntityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.Entity) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Opaque entity ID. Some IDs may be available in
+   * [Google Knowledge Graph Search
+   * API](https://developers.google.com/knowledge-graph/).
+   * 
+ * + * string entity_id = 1; + */ + java.lang.String getEntityId(); + /** + * + * + *
+   * Opaque entity ID. Some IDs may be available in
+   * [Google Knowledge Graph Search
+   * API](https://developers.google.com/knowledge-graph/).
+   * 
+ * + * string entity_id = 1; + */ + com.google.protobuf.ByteString getEntityIdBytes(); + + /** + * + * + *
+   * Textual description, e.g. `Fixed-gear bicycle`.
+   * 
+ * + * string description = 2; + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Textual description, e.g. `Fixed-gear bicycle`.
+   * 
+ * + * string description = 2; + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Language code for `description` in BCP-47 format.
+   * 
+ * + * string language_code = 3; + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * Language code for `description` in BCP-47 format.
+   * 
+ * + * string language_code = 3; + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ExplicitContentAnnotation.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ExplicitContentAnnotation.java new file mode 100644 index 000000000000..66997b5cba0f --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ExplicitContentAnnotation.java @@ -0,0 +1,994 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Explicit content annotation (based on per-frame visual signals only).
+ * If no explicit content has been detected in a frame, no annotations are
+ * present for that frame.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation} + */ +public final class ExplicitContentAnnotation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation) + ExplicitContentAnnotationOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExplicitContentAnnotation.newBuilder() to construct. + private ExplicitContentAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExplicitContentAnnotation() { + frames_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExplicitContentAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + frames_ = + new java.util.ArrayList< + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame>(); + mutable_bitField0_ |= 0x00000001; + } + frames_.add( + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + frames_ = java.util.Collections.unmodifiableList(frames_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_ExplicitContentAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_ExplicitContentAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation.class, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation.Builder.class); + } + + public static final int FRAMES_FIELD_NUMBER = 1; + private java.util.List frames_; + /** + * + * + *
+   * All video frames where explicit content was detected.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame frames = 1; + * + */ + public java.util.List + getFramesList() { + return frames_; + } + /** + * + * + *
+   * All video frames where explicit content was detected.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame frames = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrameOrBuilder> + getFramesOrBuilderList() { + return frames_; + } + /** + * + * + *
+   * All video frames where explicit content was detected.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame frames = 1; + * + */ + public int getFramesCount() { + return frames_.size(); + } + /** + * + * + *
+   * All video frames where explicit content was detected.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame frames = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame getFrames(int index) { + return frames_.get(index); + } + /** + * + * + *
+   * All video frames where explicit content was detected.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame frames = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrameOrBuilder + getFramesOrBuilder(int index) { + return frames_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < frames_.size(); i++) { + output.writeMessage(1, frames_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < frames_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, frames_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation other = + (com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation) obj; + + boolean result = true; + result = result && getFramesList().equals(other.getFramesList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFramesCount() > 0) { + hash = (37 * hash) + FRAMES_FIELD_NUMBER; + hash = (53 * hash) + getFramesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Explicit content annotation (based on per-frame visual signals only).
+   * If no explicit content has been detected in a frame, no annotations are
+   * present for that frame.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation) + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_ExplicitContentAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_ExplicitContentAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation.class, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation.Builder.class); + } + + // Construct using + // com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getFramesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (framesBuilder_ == null) { + frames_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + framesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_ExplicitContentAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation + getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation build() { + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation result = + new com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation(this); + int from_bitField0_ = bitField0_; + if (framesBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + frames_ = java.util.Collections.unmodifiableList(frames_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.frames_ = frames_; + } else { + result.frames_ = framesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation) { + return mergeFrom( + (com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation other) { + if (other + == com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation + .getDefaultInstance()) return this; + if (framesBuilder_ == null) { + if (!other.frames_.isEmpty()) { + if (frames_.isEmpty()) { + frames_ = other.frames_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFramesIsMutable(); + frames_.addAll(other.frames_); + } + onChanged(); + } + } else { + if (!other.frames_.isEmpty()) { + if (framesBuilder_.isEmpty()) { + framesBuilder_.dispose(); + framesBuilder_ = null; + frames_ = other.frames_; + bitField0_ = (bitField0_ & ~0x00000001); + framesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFramesFieldBuilder() + : null; + } else { + framesBuilder_.addAllMessages(other.frames_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + frames_ = java.util.Collections.emptyList(); + + private void ensureFramesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + frames_ = + new java.util.ArrayList< + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame>(frames_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame.Builder, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrameOrBuilder> + framesBuilder_; + + /** + * + * + *
+     * All video frames where explicit content was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame frames = 1; + * + */ + public java.util.List + getFramesList() { + if (framesBuilder_ == null) { + return java.util.Collections.unmodifiableList(frames_); + } else { + return framesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * All video frames where explicit content was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame frames = 1; + * + */ + public int getFramesCount() { + if (framesBuilder_ == null) { + return frames_.size(); + } else { + return framesBuilder_.getCount(); + } + } + /** + * + * + *
+     * All video frames where explicit content was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame frames = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame getFrames(int index) { + if (framesBuilder_ == null) { + return frames_.get(index); + } else { + return framesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * All video frames where explicit content was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame frames = 1; + * + */ + public Builder setFrames( + int index, com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame value) { + if (framesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFramesIsMutable(); + frames_.set(index, value); + onChanged(); + } else { + framesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * All video frames where explicit content was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame frames = 1; + * + */ + public Builder setFrames( + int index, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame.Builder builderForValue) { + if (framesBuilder_ == null) { + ensureFramesIsMutable(); + frames_.set(index, builderForValue.build()); + onChanged(); + } else { + framesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All video frames where explicit content was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame frames = 1; + * + */ + public Builder addFrames( + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame value) { + if (framesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFramesIsMutable(); + frames_.add(value); + onChanged(); + } else { + framesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * All video frames where explicit content was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame frames = 1; + * + */ + public Builder addFrames( + int index, com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame value) { + if (framesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFramesIsMutable(); + frames_.add(index, value); + onChanged(); + } else { + framesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * All video frames where explicit content was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame frames = 1; + * + */ + public Builder addFrames( + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame.Builder builderForValue) { + if (framesBuilder_ == null) { + ensureFramesIsMutable(); + frames_.add(builderForValue.build()); + onChanged(); + } else { + framesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All video frames where explicit content was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame frames = 1; + * + */ + public Builder addFrames( + int index, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame.Builder builderForValue) { + if (framesBuilder_ == null) { + ensureFramesIsMutable(); + frames_.add(index, builderForValue.build()); + onChanged(); + } else { + framesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All video frames where explicit content was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame frames = 1; + * + */ + public Builder addAllFrames( + java.lang.Iterable< + ? extends com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame> + values) { + if (framesBuilder_ == null) { + ensureFramesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, frames_); + onChanged(); + } else { + framesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * All video frames where explicit content was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame frames = 1; + * + */ + public Builder clearFrames() { + if (framesBuilder_ == null) { + frames_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + framesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * All video frames where explicit content was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame frames = 1; + * + */ + public Builder removeFrames(int index) { + if (framesBuilder_ == null) { + ensureFramesIsMutable(); + frames_.remove(index); + onChanged(); + } else { + framesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * All video frames where explicit content was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame frames = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame.Builder + getFramesBuilder(int index) { + return getFramesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * All video frames where explicit content was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame frames = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrameOrBuilder + getFramesOrBuilder(int index) { + if (framesBuilder_ == null) { + return frames_.get(index); + } else { + return framesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * All video frames where explicit content was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame frames = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrameOrBuilder> + getFramesOrBuilderList() { + if (framesBuilder_ != null) { + return framesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(frames_); + } + } + /** + * + * + *
+     * All video frames where explicit content was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame frames = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame.Builder + addFramesBuilder() { + return getFramesFieldBuilder() + .addBuilder( + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame + .getDefaultInstance()); + } + /** + * + * + *
+     * All video frames where explicit content was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame frames = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame.Builder + addFramesBuilder(int index) { + return getFramesFieldBuilder() + .addBuilder( + index, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame + .getDefaultInstance()); + } + /** + * + * + *
+     * All video frames where explicit content was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame frames = 1; + * + */ + public java.util.List + getFramesBuilderList() { + return getFramesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame.Builder, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrameOrBuilder> + getFramesFieldBuilder() { + if (framesBuilder_ == null) { + framesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame.Builder, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrameOrBuilder>( + frames_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + frames_ = null; + } + return framesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation) + private static final com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExplicitContentAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExplicitContentAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ExplicitContentAnnotationOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ExplicitContentAnnotationOrBuilder.java new file mode 100644 index 000000000000..2e6ee56a3504 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ExplicitContentAnnotationOrBuilder.java @@ -0,0 +1,69 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface ExplicitContentAnnotationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * All video frames where explicit content was detected.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame frames = 1; + * + */ + java.util.List getFramesList(); + /** + * + * + *
+   * All video frames where explicit content was detected.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame frames = 1; + * + */ + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame getFrames(int index); + /** + * + * + *
+   * All video frames where explicit content was detected.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame frames = 1; + * + */ + int getFramesCount(); + /** + * + * + *
+   * All video frames where explicit content was detected.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame frames = 1; + * + */ + java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrameOrBuilder> + getFramesOrBuilderList(); + /** + * + * + *
+   * All video frames where explicit content was detected.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame frames = 1; + * + */ + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrameOrBuilder getFramesOrBuilder( + int index); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ExplicitContentDetectionConfig.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ExplicitContentDetectionConfig.java new file mode 100644 index 000000000000..e56643658a02 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ExplicitContentDetectionConfig.java @@ -0,0 +1,639 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Config for EXPLICIT_CONTENT_DETECTION.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig} + */ +public final class ExplicitContentDetectionConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig) + ExplicitContentDetectionConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExplicitContentDetectionConfig.newBuilder() to construct. + private ExplicitContentDetectionConfig( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExplicitContentDetectionConfig() { + model_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExplicitContentDetectionConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + model_ = s; + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_ExplicitContentDetectionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_ExplicitContentDetectionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig.class, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig.Builder + .class); + } + + public static final int MODEL_FIELD_NUMBER = 1; + private volatile java.lang.Object model_; + /** + * + * + *
+   * Model to use for explicit content detection.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest".
+   * 
+ * + * string model = 1; + */ + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } + } + /** + * + * + *
+   * Model to use for explicit content detection.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest".
+   * 
+ * + * string model = 1; + */ + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getModelBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, model_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getModelBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, model_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig other = + (com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig) obj; + + boolean result = true; + result = result && getModel().equals(other.getModel()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Config for EXPLICIT_CONTENT_DETECTION.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig) + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_ExplicitContentDetectionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_ExplicitContentDetectionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig.class, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + model_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_ExplicitContentDetectionConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig + getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig build() { + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig + buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig result = + new com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig(this); + result.model_ = model_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig) { + return mergeFrom( + (com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig other) { + if (other + == com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig + .getDefaultInstance()) return this; + if (!other.getModel().isEmpty()) { + model_ = other.model_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object model_ = ""; + /** + * + * + *
+     * Model to use for explicit content detection.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest".
+     * 
+ * + * string model = 1; + */ + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Model to use for explicit content detection.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest".
+     * 
+ * + * string model = 1; + */ + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Model to use for explicit content detection.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest".
+     * 
+ * + * string model = 1; + */ + public Builder setModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + model_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Model to use for explicit content detection.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest".
+     * 
+ * + * string model = 1; + */ + public Builder clearModel() { + + model_ = getDefaultInstance().getModel(); + onChanged(); + return this; + } + /** + * + * + *
+     * Model to use for explicit content detection.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest".
+     * 
+ * + * string model = 1; + */ + public Builder setModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + model_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig) + private static final com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExplicitContentDetectionConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExplicitContentDetectionConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ExplicitContentDetectionConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ExplicitContentDetectionConfigOrBuilder.java new file mode 100644 index 000000000000..612fbb26fd26 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ExplicitContentDetectionConfigOrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface ExplicitContentDetectionConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Model to use for explicit content detection.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest".
+   * 
+ * + * string model = 1; + */ + java.lang.String getModel(); + /** + * + * + *
+   * Model to use for explicit content detection.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest".
+   * 
+ * + * string model = 1; + */ + com.google.protobuf.ByteString getModelBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ExplicitContentFrame.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ExplicitContentFrame.java new file mode 100644 index 000000000000..eacb4d53b3f6 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ExplicitContentFrame.java @@ -0,0 +1,859 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Video frame level annotation results for explicit content.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame} + */ +public final class ExplicitContentFrame extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame) + ExplicitContentFrameOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExplicitContentFrame.newBuilder() to construct. + private ExplicitContentFrame(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExplicitContentFrame() { + pornographyLikelihood_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExplicitContentFrame( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (timeOffset_ != null) { + subBuilder = timeOffset_.toBuilder(); + } + timeOffset_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timeOffset_); + timeOffset_ = subBuilder.buildPartial(); + } + + break; + } + case 16: + { + int rawValue = input.readEnum(); + + pornographyLikelihood_ = rawValue; + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_ExplicitContentFrame_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_ExplicitContentFrame_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame.class, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame.Builder.class); + } + + public static final int TIME_OFFSET_FIELD_NUMBER = 1; + private com.google.protobuf.Duration timeOffset_; + /** + * + * + *
+   * Time-offset, relative to the beginning of the video, corresponding to the
+   * video frame for this location.
+   * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + public boolean hasTimeOffset() { + return timeOffset_ != null; + } + /** + * + * + *
+   * Time-offset, relative to the beginning of the video, corresponding to the
+   * video frame for this location.
+   * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + public com.google.protobuf.Duration getTimeOffset() { + return timeOffset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeOffset_; + } + /** + * + * + *
+   * Time-offset, relative to the beginning of the video, corresponding to the
+   * video frame for this location.
+   * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + public com.google.protobuf.DurationOrBuilder getTimeOffsetOrBuilder() { + return getTimeOffset(); + } + + public static final int PORNOGRAPHY_LIKELIHOOD_FIELD_NUMBER = 2; + private int pornographyLikelihood_; + /** + * + * + *
+   * Likelihood of the pornography content..
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Likelihood pornography_likelihood = 2; + */ + public int getPornographyLikelihoodValue() { + return pornographyLikelihood_; + } + /** + * + * + *
+   * Likelihood of the pornography content..
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Likelihood pornography_likelihood = 2; + */ + public com.google.cloud.videointelligence.v1p3beta1.Likelihood getPornographyLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.videointelligence.v1p3beta1.Likelihood result = + com.google.cloud.videointelligence.v1p3beta1.Likelihood.valueOf(pornographyLikelihood_); + return result == null + ? com.google.cloud.videointelligence.v1p3beta1.Likelihood.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (timeOffset_ != null) { + output.writeMessage(1, getTimeOffset()); + } + if (pornographyLikelihood_ + != com.google.cloud.videointelligence.v1p3beta1.Likelihood.LIKELIHOOD_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, pornographyLikelihood_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (timeOffset_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTimeOffset()); + } + if (pornographyLikelihood_ + != com.google.cloud.videointelligence.v1p3beta1.Likelihood.LIKELIHOOD_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, pornographyLikelihood_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame other = + (com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame) obj; + + boolean result = true; + result = result && (hasTimeOffset() == other.hasTimeOffset()); + if (hasTimeOffset()) { + result = result && getTimeOffset().equals(other.getTimeOffset()); + } + result = result && pornographyLikelihood_ == other.pornographyLikelihood_; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTimeOffset()) { + hash = (37 * hash) + TIME_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getTimeOffset().hashCode(); + } + hash = (37 * hash) + PORNOGRAPHY_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + pornographyLikelihood_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Video frame level annotation results for explicit content.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame) + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrameOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_ExplicitContentFrame_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_ExplicitContentFrame_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame.class, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame.Builder.class); + } + + // Construct using + // com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (timeOffsetBuilder_ == null) { + timeOffset_ = null; + } else { + timeOffset_ = null; + timeOffsetBuilder_ = null; + } + pornographyLikelihood_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_ExplicitContentFrame_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame + getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame build() { + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame result = + new com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame(this); + if (timeOffsetBuilder_ == null) { + result.timeOffset_ = timeOffset_; + } else { + result.timeOffset_ = timeOffsetBuilder_.build(); + } + result.pornographyLikelihood_ = pornographyLikelihood_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame) { + return mergeFrom((com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame other) { + if (other + == com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame.getDefaultInstance()) + return this; + if (other.hasTimeOffset()) { + mergeTimeOffset(other.getTimeOffset()); + } + if (other.pornographyLikelihood_ != 0) { + setPornographyLikelihoodValue(other.getPornographyLikelihoodValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Duration timeOffset_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + timeOffsetBuilder_; + /** + * + * + *
+     * Time-offset, relative to the beginning of the video, corresponding to the
+     * video frame for this location.
+     * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + public boolean hasTimeOffset() { + return timeOffsetBuilder_ != null || timeOffset_ != null; + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video, corresponding to the
+     * video frame for this location.
+     * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + public com.google.protobuf.Duration getTimeOffset() { + if (timeOffsetBuilder_ == null) { + return timeOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeOffset_; + } else { + return timeOffsetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video, corresponding to the
+     * video frame for this location.
+     * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + public Builder setTimeOffset(com.google.protobuf.Duration value) { + if (timeOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeOffset_ = value; + onChanged(); + } else { + timeOffsetBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video, corresponding to the
+     * video frame for this location.
+     * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + public Builder setTimeOffset(com.google.protobuf.Duration.Builder builderForValue) { + if (timeOffsetBuilder_ == null) { + timeOffset_ = builderForValue.build(); + onChanged(); + } else { + timeOffsetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video, corresponding to the
+     * video frame for this location.
+     * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + public Builder mergeTimeOffset(com.google.protobuf.Duration value) { + if (timeOffsetBuilder_ == null) { + if (timeOffset_ != null) { + timeOffset_ = + com.google.protobuf.Duration.newBuilder(timeOffset_).mergeFrom(value).buildPartial(); + } else { + timeOffset_ = value; + } + onChanged(); + } else { + timeOffsetBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video, corresponding to the
+     * video frame for this location.
+     * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + public Builder clearTimeOffset() { + if (timeOffsetBuilder_ == null) { + timeOffset_ = null; + onChanged(); + } else { + timeOffset_ = null; + timeOffsetBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video, corresponding to the
+     * video frame for this location.
+     * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + public com.google.protobuf.Duration.Builder getTimeOffsetBuilder() { + + onChanged(); + return getTimeOffsetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video, corresponding to the
+     * video frame for this location.
+     * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + public com.google.protobuf.DurationOrBuilder getTimeOffsetOrBuilder() { + if (timeOffsetBuilder_ != null) { + return timeOffsetBuilder_.getMessageOrBuilder(); + } else { + return timeOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeOffset_; + } + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video, corresponding to the
+     * video frame for this location.
+     * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTimeOffsetFieldBuilder() { + if (timeOffsetBuilder_ == null) { + timeOffsetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTimeOffset(), getParentForChildren(), isClean()); + timeOffset_ = null; + } + return timeOffsetBuilder_; + } + + private int pornographyLikelihood_ = 0; + /** + * + * + *
+     * Likelihood of the pornography content..
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Likelihood pornography_likelihood = 2; + */ + public int getPornographyLikelihoodValue() { + return pornographyLikelihood_; + } + /** + * + * + *
+     * Likelihood of the pornography content..
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Likelihood pornography_likelihood = 2; + */ + public Builder setPornographyLikelihoodValue(int value) { + pornographyLikelihood_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Likelihood of the pornography content..
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Likelihood pornography_likelihood = 2; + */ + public com.google.cloud.videointelligence.v1p3beta1.Likelihood getPornographyLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.videointelligence.v1p3beta1.Likelihood result = + com.google.cloud.videointelligence.v1p3beta1.Likelihood.valueOf(pornographyLikelihood_); + return result == null + ? com.google.cloud.videointelligence.v1p3beta1.Likelihood.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Likelihood of the pornography content..
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Likelihood pornography_likelihood = 2; + */ + public Builder setPornographyLikelihood( + com.google.cloud.videointelligence.v1p3beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + pornographyLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Likelihood of the pornography content..
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Likelihood pornography_likelihood = 2; + */ + public Builder clearPornographyLikelihood() { + + pornographyLikelihood_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame) + private static final com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExplicitContentFrame parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExplicitContentFrame(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ExplicitContentFrameOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ExplicitContentFrameOrBuilder.java new file mode 100644 index 000000000000..95b373798552 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ExplicitContentFrameOrBuilder.java @@ -0,0 +1,65 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface ExplicitContentFrameOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Time-offset, relative to the beginning of the video, corresponding to the
+   * video frame for this location.
+   * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + boolean hasTimeOffset(); + /** + * + * + *
+   * Time-offset, relative to the beginning of the video, corresponding to the
+   * video frame for this location.
+   * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + com.google.protobuf.Duration getTimeOffset(); + /** + * + * + *
+   * Time-offset, relative to the beginning of the video, corresponding to the
+   * video frame for this location.
+   * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + com.google.protobuf.DurationOrBuilder getTimeOffsetOrBuilder(); + + /** + * + * + *
+   * Likelihood of the pornography content..
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Likelihood pornography_likelihood = 2; + */ + int getPornographyLikelihoodValue(); + /** + * + * + *
+   * Likelihood of the pornography content..
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Likelihood pornography_likelihood = 2; + */ + com.google.cloud.videointelligence.v1p3beta1.Likelihood getPornographyLikelihood(); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/Feature.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/Feature.java new file mode 100644 index 000000000000..1c808587ea21 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/Feature.java @@ -0,0 +1,218 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Video annotation feature.
+ * 
+ * + * Protobuf enum {@code google.cloud.videointelligence.v1p3beta1.Feature} + */ +public enum Feature implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified.
+   * 
+ * + * FEATURE_UNSPECIFIED = 0; + */ + FEATURE_UNSPECIFIED(0), + /** + * + * + *
+   * Label detection. Detect objects, such as dog or flower.
+   * 
+ * + * LABEL_DETECTION = 1; + */ + LABEL_DETECTION(1), + /** + * + * + *
+   * Shot change detection.
+   * 
+ * + * SHOT_CHANGE_DETECTION = 2; + */ + SHOT_CHANGE_DETECTION(2), + /** + * + * + *
+   * Explicit content detection.
+   * 
+ * + * EXPLICIT_CONTENT_DETECTION = 3; + */ + EXPLICIT_CONTENT_DETECTION(3), + /** + * + * + *
+   * OCR text detection and tracking.
+   * 
+ * + * TEXT_DETECTION = 7; + */ + TEXT_DETECTION(7), + /** + * + * + *
+   * Object detection and tracking.
+   * 
+ * + * OBJECT_TRACKING = 9; + */ + OBJECT_TRACKING(9), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Unspecified.
+   * 
+ * + * FEATURE_UNSPECIFIED = 0; + */ + public static final int FEATURE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Label detection. Detect objects, such as dog or flower.
+   * 
+ * + * LABEL_DETECTION = 1; + */ + public static final int LABEL_DETECTION_VALUE = 1; + /** + * + * + *
+   * Shot change detection.
+   * 
+ * + * SHOT_CHANGE_DETECTION = 2; + */ + public static final int SHOT_CHANGE_DETECTION_VALUE = 2; + /** + * + * + *
+   * Explicit content detection.
+   * 
+ * + * EXPLICIT_CONTENT_DETECTION = 3; + */ + public static final int EXPLICIT_CONTENT_DETECTION_VALUE = 3; + /** + * + * + *
+   * OCR text detection and tracking.
+   * 
+ * + * TEXT_DETECTION = 7; + */ + public static final int TEXT_DETECTION_VALUE = 7; + /** + * + * + *
+   * Object detection and tracking.
+   * 
+ * + * OBJECT_TRACKING = 9; + */ + public static final int OBJECT_TRACKING_VALUE = 9; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static Feature valueOf(int value) { + return forNumber(value); + } + + public static Feature forNumber(int value) { + switch (value) { + case 0: + return FEATURE_UNSPECIFIED; + case 1: + return LABEL_DETECTION; + case 2: + return SHOT_CHANGE_DETECTION; + case 3: + return EXPLICIT_CONTENT_DETECTION; + case 7: + return TEXT_DETECTION; + case 9: + return OBJECT_TRACKING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Feature findValueByNumber(int number) { + return Feature.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Feature[] VALUES = values(); + + public static Feature valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Feature(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.videointelligence.v1p3beta1.Feature) +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelAnnotation.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelAnnotation.java new file mode 100644 index 000000000000..8210f5edc2e8 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelAnnotation.java @@ -0,0 +1,2295 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Label annotation.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.LabelAnnotation} + */ +public final class LabelAnnotation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.LabelAnnotation) + LabelAnnotationOrBuilder { + private static final long serialVersionUID = 0L; + // Use LabelAnnotation.newBuilder() to construct. + private LabelAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LabelAnnotation() { + categoryEntities_ = java.util.Collections.emptyList(); + segments_ = java.util.Collections.emptyList(); + frames_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LabelAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.videointelligence.v1p3beta1.Entity.Builder subBuilder = null; + if (entity_ != null) { + subBuilder = entity_.toBuilder(); + } + entity_ = + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.Entity.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(entity_); + entity_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + categoryEntities_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + categoryEntities_.add( + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.Entity.parser(), + extensionRegistry)); + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + segments_ = + new java.util.ArrayList< + com.google.cloud.videointelligence.v1p3beta1.LabelSegment>(); + mutable_bitField0_ |= 0x00000004; + } + segments_.add( + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.LabelSegment.parser(), + extensionRegistry)); + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + frames_ = + new java.util.ArrayList< + com.google.cloud.videointelligence.v1p3beta1.LabelFrame>(); + mutable_bitField0_ |= 0x00000008; + } + frames_.add( + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.LabelFrame.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + categoryEntities_ = java.util.Collections.unmodifiableList(categoryEntities_); + } + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + segments_ = java.util.Collections.unmodifiableList(segments_); + } + if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + frames_ = java.util.Collections.unmodifiableList(frames_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_LabelAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_LabelAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.class, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder.class); + } + + private int bitField0_; + public static final int ENTITY_FIELD_NUMBER = 1; + private com.google.cloud.videointelligence.v1p3beta1.Entity entity_; + /** + * + * + *
+   * Detected entity.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Entity entity = 1; + */ + public boolean hasEntity() { + return entity_ != null; + } + /** + * + * + *
+   * Detected entity.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Entity entity = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.Entity getEntity() { + return entity_ == null + ? com.google.cloud.videointelligence.v1p3beta1.Entity.getDefaultInstance() + : entity_; + } + /** + * + * + *
+   * Detected entity.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Entity entity = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.EntityOrBuilder getEntityOrBuilder() { + return getEntity(); + } + + public static final int CATEGORY_ENTITIES_FIELD_NUMBER = 2; + private java.util.List categoryEntities_; + /** + * + * + *
+   * Common categories for the detected entity.
+   * E.g. when the label is `Terrier` the category is likely `dog`. And in some
+   * cases there might be more than one categories e.g. `Terrier` could also be
+   * a `pet`.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Entity category_entities = 2; + */ + public java.util.List + getCategoryEntitiesList() { + return categoryEntities_; + } + /** + * + * + *
+   * Common categories for the detected entity.
+   * E.g. when the label is `Terrier` the category is likely `dog`. And in some
+   * cases there might be more than one categories e.g. `Terrier` could also be
+   * a `pet`.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Entity category_entities = 2; + */ + public java.util.List + getCategoryEntitiesOrBuilderList() { + return categoryEntities_; + } + /** + * + * + *
+   * Common categories for the detected entity.
+   * E.g. when the label is `Terrier` the category is likely `dog`. And in some
+   * cases there might be more than one categories e.g. `Terrier` could also be
+   * a `pet`.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Entity category_entities = 2; + */ + public int getCategoryEntitiesCount() { + return categoryEntities_.size(); + } + /** + * + * + *
+   * Common categories for the detected entity.
+   * E.g. when the label is `Terrier` the category is likely `dog`. And in some
+   * cases there might be more than one categories e.g. `Terrier` could also be
+   * a `pet`.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Entity category_entities = 2; + */ + public com.google.cloud.videointelligence.v1p3beta1.Entity getCategoryEntities(int index) { + return categoryEntities_.get(index); + } + /** + * + * + *
+   * Common categories for the detected entity.
+   * E.g. when the label is `Terrier` the category is likely `dog`. And in some
+   * cases there might be more than one categories e.g. `Terrier` could also be
+   * a `pet`.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Entity category_entities = 2; + */ + public com.google.cloud.videointelligence.v1p3beta1.EntityOrBuilder getCategoryEntitiesOrBuilder( + int index) { + return categoryEntities_.get(index); + } + + public static final int SEGMENTS_FIELD_NUMBER = 3; + private java.util.List segments_; + /** + * + * + *
+   * All video segments where a label was detected.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelSegment segments = 3; + */ + public java.util.List + getSegmentsList() { + return segments_; + } + /** + * + * + *
+   * All video segments where a label was detected.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelSegment segments = 3; + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.LabelSegmentOrBuilder> + getSegmentsOrBuilderList() { + return segments_; + } + /** + * + * + *
+   * All video segments where a label was detected.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelSegment segments = 3; + */ + public int getSegmentsCount() { + return segments_.size(); + } + /** + * + * + *
+   * All video segments where a label was detected.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelSegment segments = 3; + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelSegment getSegments(int index) { + return segments_.get(index); + } + /** + * + * + *
+   * All video segments where a label was detected.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelSegment segments = 3; + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelSegmentOrBuilder getSegmentsOrBuilder( + int index) { + return segments_.get(index); + } + + public static final int FRAMES_FIELD_NUMBER = 4; + private java.util.List frames_; + /** + * + * + *
+   * All video frames where a label was detected.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelFrame frames = 4; + */ + public java.util.List getFramesList() { + return frames_; + } + /** + * + * + *
+   * All video frames where a label was detected.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelFrame frames = 4; + */ + public java.util.List + getFramesOrBuilderList() { + return frames_; + } + /** + * + * + *
+   * All video frames where a label was detected.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelFrame frames = 4; + */ + public int getFramesCount() { + return frames_.size(); + } + /** + * + * + *
+   * All video frames where a label was detected.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelFrame frames = 4; + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelFrame getFrames(int index) { + return frames_.get(index); + } + /** + * + * + *
+   * All video frames where a label was detected.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelFrame frames = 4; + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelFrameOrBuilder getFramesOrBuilder( + int index) { + return frames_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (entity_ != null) { + output.writeMessage(1, getEntity()); + } + for (int i = 0; i < categoryEntities_.size(); i++) { + output.writeMessage(2, categoryEntities_.get(i)); + } + for (int i = 0; i < segments_.size(); i++) { + output.writeMessage(3, segments_.get(i)); + } + for (int i = 0; i < frames_.size(); i++) { + output.writeMessage(4, frames_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (entity_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEntity()); + } + for (int i = 0; i < categoryEntities_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, categoryEntities_.get(i)); + } + for (int i = 0; i < segments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, segments_.get(i)); + } + for (int i = 0; i < frames_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, frames_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation other = + (com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation) obj; + + boolean result = true; + result = result && (hasEntity() == other.hasEntity()); + if (hasEntity()) { + result = result && getEntity().equals(other.getEntity()); + } + result = result && getCategoryEntitiesList().equals(other.getCategoryEntitiesList()); + result = result && getSegmentsList().equals(other.getSegmentsList()); + result = result && getFramesList().equals(other.getFramesList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEntity()) { + hash = (37 * hash) + ENTITY_FIELD_NUMBER; + hash = (53 * hash) + getEntity().hashCode(); + } + if (getCategoryEntitiesCount() > 0) { + hash = (37 * hash) + CATEGORY_ENTITIES_FIELD_NUMBER; + hash = (53 * hash) + getCategoryEntitiesList().hashCode(); + } + if (getSegmentsCount() > 0) { + hash = (37 * hash) + SEGMENTS_FIELD_NUMBER; + hash = (53 * hash) + getSegmentsList().hashCode(); + } + if (getFramesCount() > 0) { + hash = (37 * hash) + FRAMES_FIELD_NUMBER; + hash = (53 * hash) + getFramesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Label annotation.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.LabelAnnotation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.LabelAnnotation) + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_LabelAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_LabelAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.class, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder.class); + } + + // Construct using com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCategoryEntitiesFieldBuilder(); + getSegmentsFieldBuilder(); + getFramesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (entityBuilder_ == null) { + entity_ = null; + } else { + entity_ = null; + entityBuilder_ = null; + } + if (categoryEntitiesBuilder_ == null) { + categoryEntities_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + categoryEntitiesBuilder_.clear(); + } + if (segmentsBuilder_ == null) { + segments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + segmentsBuilder_.clear(); + } + if (framesBuilder_ == null) { + frames_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + framesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_LabelAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation + getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation build() { + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation result = + new com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (entityBuilder_ == null) { + result.entity_ = entity_; + } else { + result.entity_ = entityBuilder_.build(); + } + if (categoryEntitiesBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + categoryEntities_ = java.util.Collections.unmodifiableList(categoryEntities_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.categoryEntities_ = categoryEntities_; + } else { + result.categoryEntities_ = categoryEntitiesBuilder_.build(); + } + if (segmentsBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + segments_ = java.util.Collections.unmodifiableList(segments_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.segments_ = segments_; + } else { + result.segments_ = segmentsBuilder_.build(); + } + if (framesBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008)) { + frames_ = java.util.Collections.unmodifiableList(frames_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.frames_ = frames_; + } else { + result.frames_ = framesBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation) { + return mergeFrom((com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation other) { + if (other + == com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.getDefaultInstance()) + return this; + if (other.hasEntity()) { + mergeEntity(other.getEntity()); + } + if (categoryEntitiesBuilder_ == null) { + if (!other.categoryEntities_.isEmpty()) { + if (categoryEntities_.isEmpty()) { + categoryEntities_ = other.categoryEntities_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureCategoryEntitiesIsMutable(); + categoryEntities_.addAll(other.categoryEntities_); + } + onChanged(); + } + } else { + if (!other.categoryEntities_.isEmpty()) { + if (categoryEntitiesBuilder_.isEmpty()) { + categoryEntitiesBuilder_.dispose(); + categoryEntitiesBuilder_ = null; + categoryEntities_ = other.categoryEntities_; + bitField0_ = (bitField0_ & ~0x00000002); + categoryEntitiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCategoryEntitiesFieldBuilder() + : null; + } else { + categoryEntitiesBuilder_.addAllMessages(other.categoryEntities_); + } + } + } + if (segmentsBuilder_ == null) { + if (!other.segments_.isEmpty()) { + if (segments_.isEmpty()) { + segments_ = other.segments_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureSegmentsIsMutable(); + segments_.addAll(other.segments_); + } + onChanged(); + } + } else { + if (!other.segments_.isEmpty()) { + if (segmentsBuilder_.isEmpty()) { + segmentsBuilder_.dispose(); + segmentsBuilder_ = null; + segments_ = other.segments_; + bitField0_ = (bitField0_ & ~0x00000004); + segmentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSegmentsFieldBuilder() + : null; + } else { + segmentsBuilder_.addAllMessages(other.segments_); + } + } + } + if (framesBuilder_ == null) { + if (!other.frames_.isEmpty()) { + if (frames_.isEmpty()) { + frames_ = other.frames_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureFramesIsMutable(); + frames_.addAll(other.frames_); + } + onChanged(); + } + } else { + if (!other.frames_.isEmpty()) { + if (framesBuilder_.isEmpty()) { + framesBuilder_.dispose(); + framesBuilder_ = null; + frames_ = other.frames_; + bitField0_ = (bitField0_ & ~0x00000008); + framesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFramesFieldBuilder() + : null; + } else { + framesBuilder_.addAllMessages(other.frames_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.cloud.videointelligence.v1p3beta1.Entity entity_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.Entity, + com.google.cloud.videointelligence.v1p3beta1.Entity.Builder, + com.google.cloud.videointelligence.v1p3beta1.EntityOrBuilder> + entityBuilder_; + /** + * + * + *
+     * Detected entity.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Entity entity = 1; + */ + public boolean hasEntity() { + return entityBuilder_ != null || entity_ != null; + } + /** + * + * + *
+     * Detected entity.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Entity entity = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.Entity getEntity() { + if (entityBuilder_ == null) { + return entity_ == null + ? com.google.cloud.videointelligence.v1p3beta1.Entity.getDefaultInstance() + : entity_; + } else { + return entityBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Detected entity.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Entity entity = 1; + */ + public Builder setEntity(com.google.cloud.videointelligence.v1p3beta1.Entity value) { + if (entityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + entity_ = value; + onChanged(); + } else { + entityBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Detected entity.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Entity entity = 1; + */ + public Builder setEntity( + com.google.cloud.videointelligence.v1p3beta1.Entity.Builder builderForValue) { + if (entityBuilder_ == null) { + entity_ = builderForValue.build(); + onChanged(); + } else { + entityBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Detected entity.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Entity entity = 1; + */ + public Builder mergeEntity(com.google.cloud.videointelligence.v1p3beta1.Entity value) { + if (entityBuilder_ == null) { + if (entity_ != null) { + entity_ = + com.google.cloud.videointelligence.v1p3beta1.Entity.newBuilder(entity_) + .mergeFrom(value) + .buildPartial(); + } else { + entity_ = value; + } + onChanged(); + } else { + entityBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Detected entity.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Entity entity = 1; + */ + public Builder clearEntity() { + if (entityBuilder_ == null) { + entity_ = null; + onChanged(); + } else { + entity_ = null; + entityBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Detected entity.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Entity entity = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.Entity.Builder getEntityBuilder() { + + onChanged(); + return getEntityFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Detected entity.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Entity entity = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.EntityOrBuilder getEntityOrBuilder() { + if (entityBuilder_ != null) { + return entityBuilder_.getMessageOrBuilder(); + } else { + return entity_ == null + ? com.google.cloud.videointelligence.v1p3beta1.Entity.getDefaultInstance() + : entity_; + } + } + /** + * + * + *
+     * Detected entity.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Entity entity = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.Entity, + com.google.cloud.videointelligence.v1p3beta1.Entity.Builder, + com.google.cloud.videointelligence.v1p3beta1.EntityOrBuilder> + getEntityFieldBuilder() { + if (entityBuilder_ == null) { + entityBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.Entity, + com.google.cloud.videointelligence.v1p3beta1.Entity.Builder, + com.google.cloud.videointelligence.v1p3beta1.EntityOrBuilder>( + getEntity(), getParentForChildren(), isClean()); + entity_ = null; + } + return entityBuilder_; + } + + private java.util.List categoryEntities_ = + java.util.Collections.emptyList(); + + private void ensureCategoryEntitiesIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + categoryEntities_ = + new java.util.ArrayList( + categoryEntities_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.Entity, + com.google.cloud.videointelligence.v1p3beta1.Entity.Builder, + com.google.cloud.videointelligence.v1p3beta1.EntityOrBuilder> + categoryEntitiesBuilder_; + + /** + * + * + *
+     * Common categories for the detected entity.
+     * E.g. when the label is `Terrier` the category is likely `dog`. And in some
+     * cases there might be more than one categories e.g. `Terrier` could also be
+     * a `pet`.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Entity category_entities = 2; + */ + public java.util.List + getCategoryEntitiesList() { + if (categoryEntitiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(categoryEntities_); + } else { + return categoryEntitiesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Common categories for the detected entity.
+     * E.g. when the label is `Terrier` the category is likely `dog`. And in some
+     * cases there might be more than one categories e.g. `Terrier` could also be
+     * a `pet`.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Entity category_entities = 2; + */ + public int getCategoryEntitiesCount() { + if (categoryEntitiesBuilder_ == null) { + return categoryEntities_.size(); + } else { + return categoryEntitiesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Common categories for the detected entity.
+     * E.g. when the label is `Terrier` the category is likely `dog`. And in some
+     * cases there might be more than one categories e.g. `Terrier` could also be
+     * a `pet`.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Entity category_entities = 2; + */ + public com.google.cloud.videointelligence.v1p3beta1.Entity getCategoryEntities(int index) { + if (categoryEntitiesBuilder_ == null) { + return categoryEntities_.get(index); + } else { + return categoryEntitiesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Common categories for the detected entity.
+     * E.g. when the label is `Terrier` the category is likely `dog`. And in some
+     * cases there might be more than one categories e.g. `Terrier` could also be
+     * a `pet`.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Entity category_entities = 2; + */ + public Builder setCategoryEntities( + int index, com.google.cloud.videointelligence.v1p3beta1.Entity value) { + if (categoryEntitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCategoryEntitiesIsMutable(); + categoryEntities_.set(index, value); + onChanged(); + } else { + categoryEntitiesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Common categories for the detected entity.
+     * E.g. when the label is `Terrier` the category is likely `dog`. And in some
+     * cases there might be more than one categories e.g. `Terrier` could also be
+     * a `pet`.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Entity category_entities = 2; + */ + public Builder setCategoryEntities( + int index, com.google.cloud.videointelligence.v1p3beta1.Entity.Builder builderForValue) { + if (categoryEntitiesBuilder_ == null) { + ensureCategoryEntitiesIsMutable(); + categoryEntities_.set(index, builderForValue.build()); + onChanged(); + } else { + categoryEntitiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Common categories for the detected entity.
+     * E.g. when the label is `Terrier` the category is likely `dog`. And in some
+     * cases there might be more than one categories e.g. `Terrier` could also be
+     * a `pet`.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Entity category_entities = 2; + */ + public Builder addCategoryEntities(com.google.cloud.videointelligence.v1p3beta1.Entity value) { + if (categoryEntitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCategoryEntitiesIsMutable(); + categoryEntities_.add(value); + onChanged(); + } else { + categoryEntitiesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Common categories for the detected entity.
+     * E.g. when the label is `Terrier` the category is likely `dog`. And in some
+     * cases there might be more than one categories e.g. `Terrier` could also be
+     * a `pet`.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Entity category_entities = 2; + */ + public Builder addCategoryEntities( + int index, com.google.cloud.videointelligence.v1p3beta1.Entity value) { + if (categoryEntitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCategoryEntitiesIsMutable(); + categoryEntities_.add(index, value); + onChanged(); + } else { + categoryEntitiesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Common categories for the detected entity.
+     * E.g. when the label is `Terrier` the category is likely `dog`. And in some
+     * cases there might be more than one categories e.g. `Terrier` could also be
+     * a `pet`.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Entity category_entities = 2; + */ + public Builder addCategoryEntities( + com.google.cloud.videointelligence.v1p3beta1.Entity.Builder builderForValue) { + if (categoryEntitiesBuilder_ == null) { + ensureCategoryEntitiesIsMutable(); + categoryEntities_.add(builderForValue.build()); + onChanged(); + } else { + categoryEntitiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Common categories for the detected entity.
+     * E.g. when the label is `Terrier` the category is likely `dog`. And in some
+     * cases there might be more than one categories e.g. `Terrier` could also be
+     * a `pet`.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Entity category_entities = 2; + */ + public Builder addCategoryEntities( + int index, com.google.cloud.videointelligence.v1p3beta1.Entity.Builder builderForValue) { + if (categoryEntitiesBuilder_ == null) { + ensureCategoryEntitiesIsMutable(); + categoryEntities_.add(index, builderForValue.build()); + onChanged(); + } else { + categoryEntitiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Common categories for the detected entity.
+     * E.g. when the label is `Terrier` the category is likely `dog`. And in some
+     * cases there might be more than one categories e.g. `Terrier` could also be
+     * a `pet`.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Entity category_entities = 2; + */ + public Builder addAllCategoryEntities( + java.lang.Iterable values) { + if (categoryEntitiesBuilder_ == null) { + ensureCategoryEntitiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, categoryEntities_); + onChanged(); + } else { + categoryEntitiesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Common categories for the detected entity.
+     * E.g. when the label is `Terrier` the category is likely `dog`. And in some
+     * cases there might be more than one categories e.g. `Terrier` could also be
+     * a `pet`.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Entity category_entities = 2; + */ + public Builder clearCategoryEntities() { + if (categoryEntitiesBuilder_ == null) { + categoryEntities_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + categoryEntitiesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Common categories for the detected entity.
+     * E.g. when the label is `Terrier` the category is likely `dog`. And in some
+     * cases there might be more than one categories e.g. `Terrier` could also be
+     * a `pet`.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Entity category_entities = 2; + */ + public Builder removeCategoryEntities(int index) { + if (categoryEntitiesBuilder_ == null) { + ensureCategoryEntitiesIsMutable(); + categoryEntities_.remove(index); + onChanged(); + } else { + categoryEntitiesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Common categories for the detected entity.
+     * E.g. when the label is `Terrier` the category is likely `dog`. And in some
+     * cases there might be more than one categories e.g. `Terrier` could also be
+     * a `pet`.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Entity category_entities = 2; + */ + public com.google.cloud.videointelligence.v1p3beta1.Entity.Builder getCategoryEntitiesBuilder( + int index) { + return getCategoryEntitiesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Common categories for the detected entity.
+     * E.g. when the label is `Terrier` the category is likely `dog`. And in some
+     * cases there might be more than one categories e.g. `Terrier` could also be
+     * a `pet`.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Entity category_entities = 2; + */ + public com.google.cloud.videointelligence.v1p3beta1.EntityOrBuilder + getCategoryEntitiesOrBuilder(int index) { + if (categoryEntitiesBuilder_ == null) { + return categoryEntities_.get(index); + } else { + return categoryEntitiesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Common categories for the detected entity.
+     * E.g. when the label is `Terrier` the category is likely `dog`. And in some
+     * cases there might be more than one categories e.g. `Terrier` could also be
+     * a `pet`.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Entity category_entities = 2; + */ + public java.util.List + getCategoryEntitiesOrBuilderList() { + if (categoryEntitiesBuilder_ != null) { + return categoryEntitiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(categoryEntities_); + } + } + /** + * + * + *
+     * Common categories for the detected entity.
+     * E.g. when the label is `Terrier` the category is likely `dog`. And in some
+     * cases there might be more than one categories e.g. `Terrier` could also be
+     * a `pet`.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Entity category_entities = 2; + */ + public com.google.cloud.videointelligence.v1p3beta1.Entity.Builder + addCategoryEntitiesBuilder() { + return getCategoryEntitiesFieldBuilder() + .addBuilder(com.google.cloud.videointelligence.v1p3beta1.Entity.getDefaultInstance()); + } + /** + * + * + *
+     * Common categories for the detected entity.
+     * E.g. when the label is `Terrier` the category is likely `dog`. And in some
+     * cases there might be more than one categories e.g. `Terrier` could also be
+     * a `pet`.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Entity category_entities = 2; + */ + public com.google.cloud.videointelligence.v1p3beta1.Entity.Builder addCategoryEntitiesBuilder( + int index) { + return getCategoryEntitiesFieldBuilder() + .addBuilder( + index, com.google.cloud.videointelligence.v1p3beta1.Entity.getDefaultInstance()); + } + /** + * + * + *
+     * Common categories for the detected entity.
+     * E.g. when the label is `Terrier` the category is likely `dog`. And in some
+     * cases there might be more than one categories e.g. `Terrier` could also be
+     * a `pet`.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Entity category_entities = 2; + */ + public java.util.List + getCategoryEntitiesBuilderList() { + return getCategoryEntitiesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.Entity, + com.google.cloud.videointelligence.v1p3beta1.Entity.Builder, + com.google.cloud.videointelligence.v1p3beta1.EntityOrBuilder> + getCategoryEntitiesFieldBuilder() { + if (categoryEntitiesBuilder_ == null) { + categoryEntitiesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.Entity, + com.google.cloud.videointelligence.v1p3beta1.Entity.Builder, + com.google.cloud.videointelligence.v1p3beta1.EntityOrBuilder>( + categoryEntities_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + categoryEntities_ = null; + } + return categoryEntitiesBuilder_; + } + + private java.util.List segments_ = + java.util.Collections.emptyList(); + + private void ensureSegmentsIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + segments_ = + new java.util.ArrayList( + segments_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.LabelSegment, + com.google.cloud.videointelligence.v1p3beta1.LabelSegment.Builder, + com.google.cloud.videointelligence.v1p3beta1.LabelSegmentOrBuilder> + segmentsBuilder_; + + /** + * + * + *
+     * All video segments where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelSegment segments = 3; + */ + public java.util.List + getSegmentsList() { + if (segmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(segments_); + } else { + return segmentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * All video segments where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelSegment segments = 3; + */ + public int getSegmentsCount() { + if (segmentsBuilder_ == null) { + return segments_.size(); + } else { + return segmentsBuilder_.getCount(); + } + } + /** + * + * + *
+     * All video segments where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelSegment segments = 3; + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelSegment getSegments(int index) { + if (segmentsBuilder_ == null) { + return segments_.get(index); + } else { + return segmentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * All video segments where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelSegment segments = 3; + */ + public Builder setSegments( + int index, com.google.cloud.videointelligence.v1p3beta1.LabelSegment value) { + if (segmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSegmentsIsMutable(); + segments_.set(index, value); + onChanged(); + } else { + segmentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * All video segments where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelSegment segments = 3; + */ + public Builder setSegments( + int index, + com.google.cloud.videointelligence.v1p3beta1.LabelSegment.Builder builderForValue) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.set(index, builderForValue.build()); + onChanged(); + } else { + segmentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All video segments where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelSegment segments = 3; + */ + public Builder addSegments(com.google.cloud.videointelligence.v1p3beta1.LabelSegment value) { + if (segmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSegmentsIsMutable(); + segments_.add(value); + onChanged(); + } else { + segmentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * All video segments where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelSegment segments = 3; + */ + public Builder addSegments( + int index, com.google.cloud.videointelligence.v1p3beta1.LabelSegment value) { + if (segmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSegmentsIsMutable(); + segments_.add(index, value); + onChanged(); + } else { + segmentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * All video segments where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelSegment segments = 3; + */ + public Builder addSegments( + com.google.cloud.videointelligence.v1p3beta1.LabelSegment.Builder builderForValue) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.add(builderForValue.build()); + onChanged(); + } else { + segmentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All video segments where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelSegment segments = 3; + */ + public Builder addSegments( + int index, + com.google.cloud.videointelligence.v1p3beta1.LabelSegment.Builder builderForValue) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.add(index, builderForValue.build()); + onChanged(); + } else { + segmentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All video segments where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelSegment segments = 3; + */ + public Builder addAllSegments( + java.lang.Iterable + values) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, segments_); + onChanged(); + } else { + segmentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * All video segments where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelSegment segments = 3; + */ + public Builder clearSegments() { + if (segmentsBuilder_ == null) { + segments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + segmentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * All video segments where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelSegment segments = 3; + */ + public Builder removeSegments(int index) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.remove(index); + onChanged(); + } else { + segmentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * All video segments where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelSegment segments = 3; + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelSegment.Builder getSegmentsBuilder( + int index) { + return getSegmentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * All video segments where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelSegment segments = 3; + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelSegmentOrBuilder getSegmentsOrBuilder( + int index) { + if (segmentsBuilder_ == null) { + return segments_.get(index); + } else { + return segmentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * All video segments where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelSegment segments = 3; + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.LabelSegmentOrBuilder> + getSegmentsOrBuilderList() { + if (segmentsBuilder_ != null) { + return segmentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(segments_); + } + } + /** + * + * + *
+     * All video segments where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelSegment segments = 3; + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelSegment.Builder addSegmentsBuilder() { + return getSegmentsFieldBuilder() + .addBuilder( + com.google.cloud.videointelligence.v1p3beta1.LabelSegment.getDefaultInstance()); + } + /** + * + * + *
+     * All video segments where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelSegment segments = 3; + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelSegment.Builder addSegmentsBuilder( + int index) { + return getSegmentsFieldBuilder() + .addBuilder( + index, + com.google.cloud.videointelligence.v1p3beta1.LabelSegment.getDefaultInstance()); + } + /** + * + * + *
+     * All video segments where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelSegment segments = 3; + */ + public java.util.List + getSegmentsBuilderList() { + return getSegmentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.LabelSegment, + com.google.cloud.videointelligence.v1p3beta1.LabelSegment.Builder, + com.google.cloud.videointelligence.v1p3beta1.LabelSegmentOrBuilder> + getSegmentsFieldBuilder() { + if (segmentsBuilder_ == null) { + segmentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.LabelSegment, + com.google.cloud.videointelligence.v1p3beta1.LabelSegment.Builder, + com.google.cloud.videointelligence.v1p3beta1.LabelSegmentOrBuilder>( + segments_, + ((bitField0_ & 0x00000004) == 0x00000004), + getParentForChildren(), + isClean()); + segments_ = null; + } + return segmentsBuilder_; + } + + private java.util.List frames_ = + java.util.Collections.emptyList(); + + private void ensureFramesIsMutable() { + if (!((bitField0_ & 0x00000008) == 0x00000008)) { + frames_ = + new java.util.ArrayList( + frames_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.LabelFrame, + com.google.cloud.videointelligence.v1p3beta1.LabelFrame.Builder, + com.google.cloud.videointelligence.v1p3beta1.LabelFrameOrBuilder> + framesBuilder_; + + /** + * + * + *
+     * All video frames where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelFrame frames = 4; + */ + public java.util.List getFramesList() { + if (framesBuilder_ == null) { + return java.util.Collections.unmodifiableList(frames_); + } else { + return framesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * All video frames where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelFrame frames = 4; + */ + public int getFramesCount() { + if (framesBuilder_ == null) { + return frames_.size(); + } else { + return framesBuilder_.getCount(); + } + } + /** + * + * + *
+     * All video frames where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelFrame frames = 4; + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelFrame getFrames(int index) { + if (framesBuilder_ == null) { + return frames_.get(index); + } else { + return framesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * All video frames where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelFrame frames = 4; + */ + public Builder setFrames( + int index, com.google.cloud.videointelligence.v1p3beta1.LabelFrame value) { + if (framesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFramesIsMutable(); + frames_.set(index, value); + onChanged(); + } else { + framesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * All video frames where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelFrame frames = 4; + */ + public Builder setFrames( + int index, + com.google.cloud.videointelligence.v1p3beta1.LabelFrame.Builder builderForValue) { + if (framesBuilder_ == null) { + ensureFramesIsMutable(); + frames_.set(index, builderForValue.build()); + onChanged(); + } else { + framesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All video frames where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelFrame frames = 4; + */ + public Builder addFrames(com.google.cloud.videointelligence.v1p3beta1.LabelFrame value) { + if (framesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFramesIsMutable(); + frames_.add(value); + onChanged(); + } else { + framesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * All video frames where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelFrame frames = 4; + */ + public Builder addFrames( + int index, com.google.cloud.videointelligence.v1p3beta1.LabelFrame value) { + if (framesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFramesIsMutable(); + frames_.add(index, value); + onChanged(); + } else { + framesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * All video frames where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelFrame frames = 4; + */ + public Builder addFrames( + com.google.cloud.videointelligence.v1p3beta1.LabelFrame.Builder builderForValue) { + if (framesBuilder_ == null) { + ensureFramesIsMutable(); + frames_.add(builderForValue.build()); + onChanged(); + } else { + framesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All video frames where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelFrame frames = 4; + */ + public Builder addFrames( + int index, + com.google.cloud.videointelligence.v1p3beta1.LabelFrame.Builder builderForValue) { + if (framesBuilder_ == null) { + ensureFramesIsMutable(); + frames_.add(index, builderForValue.build()); + onChanged(); + } else { + framesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All video frames where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelFrame frames = 4; + */ + public Builder addAllFrames( + java.lang.Iterable + values) { + if (framesBuilder_ == null) { + ensureFramesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, frames_); + onChanged(); + } else { + framesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * All video frames where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelFrame frames = 4; + */ + public Builder clearFrames() { + if (framesBuilder_ == null) { + frames_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + framesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * All video frames where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelFrame frames = 4; + */ + public Builder removeFrames(int index) { + if (framesBuilder_ == null) { + ensureFramesIsMutable(); + frames_.remove(index); + onChanged(); + } else { + framesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * All video frames where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelFrame frames = 4; + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelFrame.Builder getFramesBuilder( + int index) { + return getFramesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * All video frames where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelFrame frames = 4; + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelFrameOrBuilder getFramesOrBuilder( + int index) { + if (framesBuilder_ == null) { + return frames_.get(index); + } else { + return framesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * All video frames where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelFrame frames = 4; + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.LabelFrameOrBuilder> + getFramesOrBuilderList() { + if (framesBuilder_ != null) { + return framesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(frames_); + } + } + /** + * + * + *
+     * All video frames where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelFrame frames = 4; + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelFrame.Builder addFramesBuilder() { + return getFramesFieldBuilder() + .addBuilder(com.google.cloud.videointelligence.v1p3beta1.LabelFrame.getDefaultInstance()); + } + /** + * + * + *
+     * All video frames where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelFrame frames = 4; + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelFrame.Builder addFramesBuilder( + int index) { + return getFramesFieldBuilder() + .addBuilder( + index, com.google.cloud.videointelligence.v1p3beta1.LabelFrame.getDefaultInstance()); + } + /** + * + * + *
+     * All video frames where a label was detected.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelFrame frames = 4; + */ + public java.util.List + getFramesBuilderList() { + return getFramesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.LabelFrame, + com.google.cloud.videointelligence.v1p3beta1.LabelFrame.Builder, + com.google.cloud.videointelligence.v1p3beta1.LabelFrameOrBuilder> + getFramesFieldBuilder() { + if (framesBuilder_ == null) { + framesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.LabelFrame, + com.google.cloud.videointelligence.v1p3beta1.LabelFrame.Builder, + com.google.cloud.videointelligence.v1p3beta1.LabelFrameOrBuilder>( + frames_, + ((bitField0_ & 0x00000008) == 0x00000008), + getParentForChildren(), + isClean()); + frames_ = null; + } + return framesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.LabelAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.LabelAnnotation) + private static final com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LabelAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LabelAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelAnnotationOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelAnnotationOrBuilder.java new file mode 100644 index 000000000000..57cede7d3563 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelAnnotationOrBuilder.java @@ -0,0 +1,214 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface LabelAnnotationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.LabelAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Detected entity.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Entity entity = 1; + */ + boolean hasEntity(); + /** + * + * + *
+   * Detected entity.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Entity entity = 1; + */ + com.google.cloud.videointelligence.v1p3beta1.Entity getEntity(); + /** + * + * + *
+   * Detected entity.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Entity entity = 1; + */ + com.google.cloud.videointelligence.v1p3beta1.EntityOrBuilder getEntityOrBuilder(); + + /** + * + * + *
+   * Common categories for the detected entity.
+   * E.g. when the label is `Terrier` the category is likely `dog`. And in some
+   * cases there might be more than one categories e.g. `Terrier` could also be
+   * a `pet`.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Entity category_entities = 2; + */ + java.util.List getCategoryEntitiesList(); + /** + * + * + *
+   * Common categories for the detected entity.
+   * E.g. when the label is `Terrier` the category is likely `dog`. And in some
+   * cases there might be more than one categories e.g. `Terrier` could also be
+   * a `pet`.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Entity category_entities = 2; + */ + com.google.cloud.videointelligence.v1p3beta1.Entity getCategoryEntities(int index); + /** + * + * + *
+   * Common categories for the detected entity.
+   * E.g. when the label is `Terrier` the category is likely `dog`. And in some
+   * cases there might be more than one categories e.g. `Terrier` could also be
+   * a `pet`.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Entity category_entities = 2; + */ + int getCategoryEntitiesCount(); + /** + * + * + *
+   * Common categories for the detected entity.
+   * E.g. when the label is `Terrier` the category is likely `dog`. And in some
+   * cases there might be more than one categories e.g. `Terrier` could also be
+   * a `pet`.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Entity category_entities = 2; + */ + java.util.List + getCategoryEntitiesOrBuilderList(); + /** + * + * + *
+   * Common categories for the detected entity.
+   * E.g. when the label is `Terrier` the category is likely `dog`. And in some
+   * cases there might be more than one categories e.g. `Terrier` could also be
+   * a `pet`.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.Entity category_entities = 2; + */ + com.google.cloud.videointelligence.v1p3beta1.EntityOrBuilder getCategoryEntitiesOrBuilder( + int index); + + /** + * + * + *
+   * All video segments where a label was detected.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelSegment segments = 3; + */ + java.util.List getSegmentsList(); + /** + * + * + *
+   * All video segments where a label was detected.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelSegment segments = 3; + */ + com.google.cloud.videointelligence.v1p3beta1.LabelSegment getSegments(int index); + /** + * + * + *
+   * All video segments where a label was detected.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelSegment segments = 3; + */ + int getSegmentsCount(); + /** + * + * + *
+   * All video segments where a label was detected.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelSegment segments = 3; + */ + java.util.List + getSegmentsOrBuilderList(); + /** + * + * + *
+   * All video segments where a label was detected.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelSegment segments = 3; + */ + com.google.cloud.videointelligence.v1p3beta1.LabelSegmentOrBuilder getSegmentsOrBuilder( + int index); + + /** + * + * + *
+   * All video frames where a label was detected.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelFrame frames = 4; + */ + java.util.List getFramesList(); + /** + * + * + *
+   * All video frames where a label was detected.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelFrame frames = 4; + */ + com.google.cloud.videointelligence.v1p3beta1.LabelFrame getFrames(int index); + /** + * + * + *
+   * All video frames where a label was detected.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelFrame frames = 4; + */ + int getFramesCount(); + /** + * + * + *
+   * All video frames where a label was detected.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelFrame frames = 4; + */ + java.util.List + getFramesOrBuilderList(); + /** + * + * + *
+   * All video frames where a label was detected.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelFrame frames = 4; + */ + com.google.cloud.videointelligence.v1p3beta1.LabelFrameOrBuilder getFramesOrBuilder(int index); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelDetectionConfig.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelDetectionConfig.java new file mode 100644 index 000000000000..0a3c4a7a9c4c --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelDetectionConfig.java @@ -0,0 +1,872 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Config for LABEL_DETECTION.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig} + */ +public final class LabelDetectionConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig) + LabelDetectionConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use LabelDetectionConfig.newBuilder() to construct. + private LabelDetectionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LabelDetectionConfig() { + labelDetectionMode_ = 0; + stationaryCamera_ = false; + model_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LabelDetectionConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + labelDetectionMode_ = rawValue; + break; + } + case 16: + { + stationaryCamera_ = input.readBool(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + model_ = s; + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_LabelDetectionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_LabelDetectionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig.class, + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig.Builder.class); + } + + public static final int LABEL_DETECTION_MODE_FIELD_NUMBER = 1; + private int labelDetectionMode_; + /** + * + * + *
+   * What labels should be detected with LABEL_DETECTION, in addition to
+   * video-level labels or segment-level labels.
+   * If unspecified, defaults to `SHOT_MODE`.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.LabelDetectionMode label_detection_mode = 1; + * + */ + public int getLabelDetectionModeValue() { + return labelDetectionMode_; + } + /** + * + * + *
+   * What labels should be detected with LABEL_DETECTION, in addition to
+   * video-level labels or segment-level labels.
+   * If unspecified, defaults to `SHOT_MODE`.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.LabelDetectionMode label_detection_mode = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelDetectionMode getLabelDetectionMode() { + @SuppressWarnings("deprecation") + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionMode result = + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionMode.valueOf( + labelDetectionMode_); + return result == null + ? com.google.cloud.videointelligence.v1p3beta1.LabelDetectionMode.UNRECOGNIZED + : result; + } + + public static final int STATIONARY_CAMERA_FIELD_NUMBER = 2; + private boolean stationaryCamera_; + /** + * + * + *
+   * Whether the video has been shot from a stationary (i.e. non-moving) camera.
+   * When set to true, might improve detection accuracy for moving objects.
+   * Should be used with `SHOT_AND_FRAME_MODE` enabled.
+   * 
+ * + * bool stationary_camera = 2; + */ + public boolean getStationaryCamera() { + return stationaryCamera_; + } + + public static final int MODEL_FIELD_NUMBER = 3; + private volatile java.lang.Object model_; + /** + * + * + *
+   * Model to use for label detection.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest".
+   * 
+ * + * string model = 3; + */ + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } + } + /** + * + * + *
+   * Model to use for label detection.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest".
+   * 
+ * + * string model = 3; + */ + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (labelDetectionMode_ + != com.google.cloud.videointelligence.v1p3beta1.LabelDetectionMode + .LABEL_DETECTION_MODE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, labelDetectionMode_); + } + if (stationaryCamera_ != false) { + output.writeBool(2, stationaryCamera_); + } + if (!getModelBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, model_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (labelDetectionMode_ + != com.google.cloud.videointelligence.v1p3beta1.LabelDetectionMode + .LABEL_DETECTION_MODE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, labelDetectionMode_); + } + if (stationaryCamera_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, stationaryCamera_); + } + if (!getModelBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, model_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig other = + (com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig) obj; + + boolean result = true; + result = result && labelDetectionMode_ == other.labelDetectionMode_; + result = result && (getStationaryCamera() == other.getStationaryCamera()); + result = result && getModel().equals(other.getModel()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LABEL_DETECTION_MODE_FIELD_NUMBER; + hash = (53 * hash) + labelDetectionMode_; + hash = (37 * hash) + STATIONARY_CAMERA_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getStationaryCamera()); + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Config for LABEL_DETECTION.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig) + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_LabelDetectionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_LabelDetectionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig.class, + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig.Builder.class); + } + + // Construct using + // com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + labelDetectionMode_ = 0; + + stationaryCamera_ = false; + + model_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_LabelDetectionConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig + getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig build() { + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig result = + new com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig(this); + result.labelDetectionMode_ = labelDetectionMode_; + result.stationaryCamera_ = stationaryCamera_; + result.model_ = model_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig) { + return mergeFrom((com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig other) { + if (other + == com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig.getDefaultInstance()) + return this; + if (other.labelDetectionMode_ != 0) { + setLabelDetectionModeValue(other.getLabelDetectionModeValue()); + } + if (other.getStationaryCamera() != false) { + setStationaryCamera(other.getStationaryCamera()); + } + if (!other.getModel().isEmpty()) { + model_ = other.model_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int labelDetectionMode_ = 0; + /** + * + * + *
+     * What labels should be detected with LABEL_DETECTION, in addition to
+     * video-level labels or segment-level labels.
+     * If unspecified, defaults to `SHOT_MODE`.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.LabelDetectionMode label_detection_mode = 1; + * + */ + public int getLabelDetectionModeValue() { + return labelDetectionMode_; + } + /** + * + * + *
+     * What labels should be detected with LABEL_DETECTION, in addition to
+     * video-level labels or segment-level labels.
+     * If unspecified, defaults to `SHOT_MODE`.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.LabelDetectionMode label_detection_mode = 1; + * + */ + public Builder setLabelDetectionModeValue(int value) { + labelDetectionMode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * What labels should be detected with LABEL_DETECTION, in addition to
+     * video-level labels or segment-level labels.
+     * If unspecified, defaults to `SHOT_MODE`.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.LabelDetectionMode label_detection_mode = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelDetectionMode getLabelDetectionMode() { + @SuppressWarnings("deprecation") + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionMode result = + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionMode.valueOf( + labelDetectionMode_); + return result == null + ? com.google.cloud.videointelligence.v1p3beta1.LabelDetectionMode.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * What labels should be detected with LABEL_DETECTION, in addition to
+     * video-level labels or segment-level labels.
+     * If unspecified, defaults to `SHOT_MODE`.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.LabelDetectionMode label_detection_mode = 1; + * + */ + public Builder setLabelDetectionMode( + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionMode value) { + if (value == null) { + throw new NullPointerException(); + } + + labelDetectionMode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * What labels should be detected with LABEL_DETECTION, in addition to
+     * video-level labels or segment-level labels.
+     * If unspecified, defaults to `SHOT_MODE`.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.LabelDetectionMode label_detection_mode = 1; + * + */ + public Builder clearLabelDetectionMode() { + + labelDetectionMode_ = 0; + onChanged(); + return this; + } + + private boolean stationaryCamera_; + /** + * + * + *
+     * Whether the video has been shot from a stationary (i.e. non-moving) camera.
+     * When set to true, might improve detection accuracy for moving objects.
+     * Should be used with `SHOT_AND_FRAME_MODE` enabled.
+     * 
+ * + * bool stationary_camera = 2; + */ + public boolean getStationaryCamera() { + return stationaryCamera_; + } + /** + * + * + *
+     * Whether the video has been shot from a stationary (i.e. non-moving) camera.
+     * When set to true, might improve detection accuracy for moving objects.
+     * Should be used with `SHOT_AND_FRAME_MODE` enabled.
+     * 
+ * + * bool stationary_camera = 2; + */ + public Builder setStationaryCamera(boolean value) { + + stationaryCamera_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether the video has been shot from a stationary (i.e. non-moving) camera.
+     * When set to true, might improve detection accuracy for moving objects.
+     * Should be used with `SHOT_AND_FRAME_MODE` enabled.
+     * 
+ * + * bool stationary_camera = 2; + */ + public Builder clearStationaryCamera() { + + stationaryCamera_ = false; + onChanged(); + return this; + } + + private java.lang.Object model_ = ""; + /** + * + * + *
+     * Model to use for label detection.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest".
+     * 
+ * + * string model = 3; + */ + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Model to use for label detection.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest".
+     * 
+ * + * string model = 3; + */ + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Model to use for label detection.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest".
+     * 
+ * + * string model = 3; + */ + public Builder setModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + model_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Model to use for label detection.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest".
+     * 
+ * + * string model = 3; + */ + public Builder clearModel() { + + model_ = getDefaultInstance().getModel(); + onChanged(); + return this; + } + /** + * + * + *
+     * Model to use for label detection.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest".
+     * 
+ * + * string model = 3; + */ + public Builder setModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + model_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig) + private static final com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LabelDetectionConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LabelDetectionConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelDetectionConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelDetectionConfigOrBuilder.java new file mode 100644 index 000000000000..bb1c78854e62 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelDetectionConfigOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface LabelDetectionConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * What labels should be detected with LABEL_DETECTION, in addition to
+   * video-level labels or segment-level labels.
+   * If unspecified, defaults to `SHOT_MODE`.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.LabelDetectionMode label_detection_mode = 1; + * + */ + int getLabelDetectionModeValue(); + /** + * + * + *
+   * What labels should be detected with LABEL_DETECTION, in addition to
+   * video-level labels or segment-level labels.
+   * If unspecified, defaults to `SHOT_MODE`.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.LabelDetectionMode label_detection_mode = 1; + * + */ + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionMode getLabelDetectionMode(); + + /** + * + * + *
+   * Whether the video has been shot from a stationary (i.e. non-moving) camera.
+   * When set to true, might improve detection accuracy for moving objects.
+   * Should be used with `SHOT_AND_FRAME_MODE` enabled.
+   * 
+ * + * bool stationary_camera = 2; + */ + boolean getStationaryCamera(); + + /** + * + * + *
+   * Model to use for label detection.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest".
+   * 
+ * + * string model = 3; + */ + java.lang.String getModel(); + /** + * + * + *
+   * Model to use for label detection.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest".
+   * 
+ * + * string model = 3; + */ + com.google.protobuf.ByteString getModelBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelDetectionMode.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelDetectionMode.java new file mode 100644 index 000000000000..122651f6fb3c --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelDetectionMode.java @@ -0,0 +1,176 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Label detection mode.
+ * 
+ * + * Protobuf enum {@code google.cloud.videointelligence.v1p3beta1.LabelDetectionMode} + */ +public enum LabelDetectionMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified.
+   * 
+ * + * LABEL_DETECTION_MODE_UNSPECIFIED = 0; + */ + LABEL_DETECTION_MODE_UNSPECIFIED(0), + /** + * + * + *
+   * Detect shot-level labels.
+   * 
+ * + * SHOT_MODE = 1; + */ + SHOT_MODE(1), + /** + * + * + *
+   * Detect frame-level labels.
+   * 
+ * + * FRAME_MODE = 2; + */ + FRAME_MODE(2), + /** + * + * + *
+   * Detect both shot-level and frame-level labels.
+   * 
+ * + * SHOT_AND_FRAME_MODE = 3; + */ + SHOT_AND_FRAME_MODE(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Unspecified.
+   * 
+ * + * LABEL_DETECTION_MODE_UNSPECIFIED = 0; + */ + public static final int LABEL_DETECTION_MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Detect shot-level labels.
+   * 
+ * + * SHOT_MODE = 1; + */ + public static final int SHOT_MODE_VALUE = 1; + /** + * + * + *
+   * Detect frame-level labels.
+   * 
+ * + * FRAME_MODE = 2; + */ + public static final int FRAME_MODE_VALUE = 2; + /** + * + * + *
+   * Detect both shot-level and frame-level labels.
+   * 
+ * + * SHOT_AND_FRAME_MODE = 3; + */ + public static final int SHOT_AND_FRAME_MODE_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static LabelDetectionMode valueOf(int value) { + return forNumber(value); + } + + public static LabelDetectionMode forNumber(int value) { + switch (value) { + case 0: + return LABEL_DETECTION_MODE_UNSPECIFIED; + case 1: + return SHOT_MODE; + case 2: + return FRAME_MODE; + case 3: + return SHOT_AND_FRAME_MODE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public LabelDetectionMode findValueByNumber(int number) { + return LabelDetectionMode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final LabelDetectionMode[] VALUES = values(); + + public static LabelDetectionMode valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private LabelDetectionMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.videointelligence.v1p3beta1.LabelDetectionMode) +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelFrame.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelFrame.java new file mode 100644 index 000000000000..af457047bd8c --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelFrame.java @@ -0,0 +1,795 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Video frame level annotation results for label detection.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.LabelFrame} + */ +public final class LabelFrame extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.LabelFrame) + LabelFrameOrBuilder { + private static final long serialVersionUID = 0L; + // Use LabelFrame.newBuilder() to construct. + private LabelFrame(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LabelFrame() { + confidence_ = 0F; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LabelFrame( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (timeOffset_ != null) { + subBuilder = timeOffset_.toBuilder(); + } + timeOffset_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timeOffset_); + timeOffset_ = subBuilder.buildPartial(); + } + + break; + } + case 21: + { + confidence_ = input.readFloat(); + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_LabelFrame_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_LabelFrame_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.LabelFrame.class, + com.google.cloud.videointelligence.v1p3beta1.LabelFrame.Builder.class); + } + + public static final int TIME_OFFSET_FIELD_NUMBER = 1; + private com.google.protobuf.Duration timeOffset_; + /** + * + * + *
+   * Time-offset, relative to the beginning of the video, corresponding to the
+   * video frame for this location.
+   * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + public boolean hasTimeOffset() { + return timeOffset_ != null; + } + /** + * + * + *
+   * Time-offset, relative to the beginning of the video, corresponding to the
+   * video frame for this location.
+   * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + public com.google.protobuf.Duration getTimeOffset() { + return timeOffset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeOffset_; + } + /** + * + * + *
+   * Time-offset, relative to the beginning of the video, corresponding to the
+   * video frame for this location.
+   * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + public com.google.protobuf.DurationOrBuilder getTimeOffsetOrBuilder() { + return getTimeOffset(); + } + + public static final int CONFIDENCE_FIELD_NUMBER = 2; + private float confidence_; + /** + * + * + *
+   * Confidence that the label is accurate. Range: [0, 1].
+   * 
+ * + * float confidence = 2; + */ + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (timeOffset_ != null) { + output.writeMessage(1, getTimeOffset()); + } + if (confidence_ != 0F) { + output.writeFloat(2, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (timeOffset_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTimeOffset()); + } + if (confidence_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.videointelligence.v1p3beta1.LabelFrame)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.LabelFrame other = + (com.google.cloud.videointelligence.v1p3beta1.LabelFrame) obj; + + boolean result = true; + result = result && (hasTimeOffset() == other.hasTimeOffset()); + if (hasTimeOffset()) { + result = result && getTimeOffset().equals(other.getTimeOffset()); + } + result = + result + && (java.lang.Float.floatToIntBits(getConfidence()) + == java.lang.Float.floatToIntBits(other.getConfidence())); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTimeOffset()) { + hash = (37 * hash) + TIME_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getTimeOffset().hashCode(); + } + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelFrame parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelFrame parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelFrame parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelFrame parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelFrame parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelFrame parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelFrame parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelFrame parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelFrame parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelFrame parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelFrame parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelFrame parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.LabelFrame prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Video frame level annotation results for label detection.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.LabelFrame} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.LabelFrame) + com.google.cloud.videointelligence.v1p3beta1.LabelFrameOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_LabelFrame_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_LabelFrame_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.LabelFrame.class, + com.google.cloud.videointelligence.v1p3beta1.LabelFrame.Builder.class); + } + + // Construct using com.google.cloud.videointelligence.v1p3beta1.LabelFrame.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (timeOffsetBuilder_ == null) { + timeOffset_ = null; + } else { + timeOffset_ = null; + timeOffsetBuilder_ = null; + } + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_LabelFrame_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.LabelFrame getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.LabelFrame.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.LabelFrame build() { + com.google.cloud.videointelligence.v1p3beta1.LabelFrame result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.LabelFrame buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.LabelFrame result = + new com.google.cloud.videointelligence.v1p3beta1.LabelFrame(this); + if (timeOffsetBuilder_ == null) { + result.timeOffset_ = timeOffset_; + } else { + result.timeOffset_ = timeOffsetBuilder_.build(); + } + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.videointelligence.v1p3beta1.LabelFrame) { + return mergeFrom((com.google.cloud.videointelligence.v1p3beta1.LabelFrame) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.videointelligence.v1p3beta1.LabelFrame other) { + if (other == com.google.cloud.videointelligence.v1p3beta1.LabelFrame.getDefaultInstance()) + return this; + if (other.hasTimeOffset()) { + mergeTimeOffset(other.getTimeOffset()); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.LabelFrame parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.LabelFrame) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Duration timeOffset_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + timeOffsetBuilder_; + /** + * + * + *
+     * Time-offset, relative to the beginning of the video, corresponding to the
+     * video frame for this location.
+     * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + public boolean hasTimeOffset() { + return timeOffsetBuilder_ != null || timeOffset_ != null; + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video, corresponding to the
+     * video frame for this location.
+     * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + public com.google.protobuf.Duration getTimeOffset() { + if (timeOffsetBuilder_ == null) { + return timeOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeOffset_; + } else { + return timeOffsetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video, corresponding to the
+     * video frame for this location.
+     * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + public Builder setTimeOffset(com.google.protobuf.Duration value) { + if (timeOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeOffset_ = value; + onChanged(); + } else { + timeOffsetBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video, corresponding to the
+     * video frame for this location.
+     * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + public Builder setTimeOffset(com.google.protobuf.Duration.Builder builderForValue) { + if (timeOffsetBuilder_ == null) { + timeOffset_ = builderForValue.build(); + onChanged(); + } else { + timeOffsetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video, corresponding to the
+     * video frame for this location.
+     * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + public Builder mergeTimeOffset(com.google.protobuf.Duration value) { + if (timeOffsetBuilder_ == null) { + if (timeOffset_ != null) { + timeOffset_ = + com.google.protobuf.Duration.newBuilder(timeOffset_).mergeFrom(value).buildPartial(); + } else { + timeOffset_ = value; + } + onChanged(); + } else { + timeOffsetBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video, corresponding to the
+     * video frame for this location.
+     * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + public Builder clearTimeOffset() { + if (timeOffsetBuilder_ == null) { + timeOffset_ = null; + onChanged(); + } else { + timeOffset_ = null; + timeOffsetBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video, corresponding to the
+     * video frame for this location.
+     * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + public com.google.protobuf.Duration.Builder getTimeOffsetBuilder() { + + onChanged(); + return getTimeOffsetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video, corresponding to the
+     * video frame for this location.
+     * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + public com.google.protobuf.DurationOrBuilder getTimeOffsetOrBuilder() { + if (timeOffsetBuilder_ != null) { + return timeOffsetBuilder_.getMessageOrBuilder(); + } else { + return timeOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeOffset_; + } + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video, corresponding to the
+     * video frame for this location.
+     * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTimeOffsetFieldBuilder() { + if (timeOffsetBuilder_ == null) { + timeOffsetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTimeOffset(), getParentForChildren(), isClean()); + timeOffset_ = null; + } + return timeOffsetBuilder_; + } + + private float confidence_; + /** + * + * + *
+     * Confidence that the label is accurate. Range: [0, 1].
+     * 
+ * + * float confidence = 2; + */ + public float getConfidence() { + return confidence_; + } + /** + * + * + *
+     * Confidence that the label is accurate. Range: [0, 1].
+     * 
+ * + * float confidence = 2; + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Confidence that the label is accurate. Range: [0, 1].
+     * 
+ * + * float confidence = 2; + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.LabelFrame) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.LabelFrame) + private static final com.google.cloud.videointelligence.v1p3beta1.LabelFrame DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.videointelligence.v1p3beta1.LabelFrame(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelFrame getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LabelFrame parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LabelFrame(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.LabelFrame getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelFrameOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelFrameOrBuilder.java new file mode 100644 index 000000000000..6768143890df --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelFrameOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface LabelFrameOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.LabelFrame) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Time-offset, relative to the beginning of the video, corresponding to the
+   * video frame for this location.
+   * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + boolean hasTimeOffset(); + /** + * + * + *
+   * Time-offset, relative to the beginning of the video, corresponding to the
+   * video frame for this location.
+   * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + com.google.protobuf.Duration getTimeOffset(); + /** + * + * + *
+   * Time-offset, relative to the beginning of the video, corresponding to the
+   * video frame for this location.
+   * 
+ * + * .google.protobuf.Duration time_offset = 1; + */ + com.google.protobuf.DurationOrBuilder getTimeOffsetOrBuilder(); + + /** + * + * + *
+   * Confidence that the label is accurate. Range: [0, 1].
+   * 
+ * + * float confidence = 2; + */ + float getConfidence(); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelSegment.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelSegment.java new file mode 100644 index 000000000000..0869f023e290 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelSegment.java @@ -0,0 +1,791 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Video segment level annotation results for label detection.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.LabelSegment} + */ +public final class LabelSegment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.LabelSegment) + LabelSegmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use LabelSegment.newBuilder() to construct. + private LabelSegment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LabelSegment() { + confidence_ = 0F; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LabelSegment( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder subBuilder = null; + if (segment_ != null) { + subBuilder = segment_.toBuilder(); + } + segment_ = + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(segment_); + segment_ = subBuilder.buildPartial(); + } + + break; + } + case 21: + { + confidence_ = input.readFloat(); + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_LabelSegment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_LabelSegment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.LabelSegment.class, + com.google.cloud.videointelligence.v1p3beta1.LabelSegment.Builder.class); + } + + public static final int SEGMENT_FIELD_NUMBER = 1; + private com.google.cloud.videointelligence.v1p3beta1.VideoSegment segment_; + /** + * + * + *
+   * Video segment where a label was detected.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1; + */ + public boolean hasSegment() { + return segment_ != null; + } + /** + * + * + *
+   * Video segment where a label was detected.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegment getSegment() { + return segment_ == null + ? com.google.cloud.videointelligence.v1p3beta1.VideoSegment.getDefaultInstance() + : segment_; + } + /** + * + * + *
+   * Video segment where a label was detected.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder getSegmentOrBuilder() { + return getSegment(); + } + + public static final int CONFIDENCE_FIELD_NUMBER = 2; + private float confidence_; + /** + * + * + *
+   * Confidence that the label is accurate. Range: [0, 1].
+   * 
+ * + * float confidence = 2; + */ + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (segment_ != null) { + output.writeMessage(1, getSegment()); + } + if (confidence_ != 0F) { + output.writeFloat(2, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (segment_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSegment()); + } + if (confidence_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.videointelligence.v1p3beta1.LabelSegment)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.LabelSegment other = + (com.google.cloud.videointelligence.v1p3beta1.LabelSegment) obj; + + boolean result = true; + result = result && (hasSegment() == other.hasSegment()); + if (hasSegment()) { + result = result && getSegment().equals(other.getSegment()); + } + result = + result + && (java.lang.Float.floatToIntBits(getConfidence()) + == java.lang.Float.floatToIntBits(other.getConfidence())); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSegment()) { + hash = (37 * hash) + SEGMENT_FIELD_NUMBER; + hash = (53 * hash) + getSegment().hashCode(); + } + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelSegment parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelSegment parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelSegment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelSegment parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelSegment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelSegment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelSegment parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelSegment parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelSegment parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelSegment parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelSegment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelSegment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.LabelSegment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Video segment level annotation results for label detection.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.LabelSegment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.LabelSegment) + com.google.cloud.videointelligence.v1p3beta1.LabelSegmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_LabelSegment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_LabelSegment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.LabelSegment.class, + com.google.cloud.videointelligence.v1p3beta1.LabelSegment.Builder.class); + } + + // Construct using com.google.cloud.videointelligence.v1p3beta1.LabelSegment.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (segmentBuilder_ == null) { + segment_ = null; + } else { + segment_ = null; + segmentBuilder_ = null; + } + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_LabelSegment_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.LabelSegment getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.LabelSegment.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.LabelSegment build() { + com.google.cloud.videointelligence.v1p3beta1.LabelSegment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.LabelSegment buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.LabelSegment result = + new com.google.cloud.videointelligence.v1p3beta1.LabelSegment(this); + if (segmentBuilder_ == null) { + result.segment_ = segment_; + } else { + result.segment_ = segmentBuilder_.build(); + } + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.videointelligence.v1p3beta1.LabelSegment) { + return mergeFrom((com.google.cloud.videointelligence.v1p3beta1.LabelSegment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.videointelligence.v1p3beta1.LabelSegment other) { + if (other == com.google.cloud.videointelligence.v1p3beta1.LabelSegment.getDefaultInstance()) + return this; + if (other.hasSegment()) { + mergeSegment(other.getSegment()); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.LabelSegment parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.LabelSegment) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.videointelligence.v1p3beta1.VideoSegment segment_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.VideoSegment, + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder, + com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder> + segmentBuilder_; + /** + * + * + *
+     * Video segment where a label was detected.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1; + */ + public boolean hasSegment() { + return segmentBuilder_ != null || segment_ != null; + } + /** + * + * + *
+     * Video segment where a label was detected.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegment getSegment() { + if (segmentBuilder_ == null) { + return segment_ == null + ? com.google.cloud.videointelligence.v1p3beta1.VideoSegment.getDefaultInstance() + : segment_; + } else { + return segmentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Video segment where a label was detected.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1; + */ + public Builder setSegment(com.google.cloud.videointelligence.v1p3beta1.VideoSegment value) { + if (segmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + segment_ = value; + onChanged(); + } else { + segmentBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Video segment where a label was detected.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1; + */ + public Builder setSegment( + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder builderForValue) { + if (segmentBuilder_ == null) { + segment_ = builderForValue.build(); + onChanged(); + } else { + segmentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Video segment where a label was detected.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1; + */ + public Builder mergeSegment(com.google.cloud.videointelligence.v1p3beta1.VideoSegment value) { + if (segmentBuilder_ == null) { + if (segment_ != null) { + segment_ = + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.newBuilder(segment_) + .mergeFrom(value) + .buildPartial(); + } else { + segment_ = value; + } + onChanged(); + } else { + segmentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Video segment where a label was detected.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1; + */ + public Builder clearSegment() { + if (segmentBuilder_ == null) { + segment_ = null; + onChanged(); + } else { + segment_ = null; + segmentBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Video segment where a label was detected.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder getSegmentBuilder() { + + onChanged(); + return getSegmentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Video segment where a label was detected.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder + getSegmentOrBuilder() { + if (segmentBuilder_ != null) { + return segmentBuilder_.getMessageOrBuilder(); + } else { + return segment_ == null + ? com.google.cloud.videointelligence.v1p3beta1.VideoSegment.getDefaultInstance() + : segment_; + } + } + /** + * + * + *
+     * Video segment where a label was detected.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.VideoSegment, + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder, + com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder> + getSegmentFieldBuilder() { + if (segmentBuilder_ == null) { + segmentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.VideoSegment, + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder, + com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder>( + getSegment(), getParentForChildren(), isClean()); + segment_ = null; + } + return segmentBuilder_; + } + + private float confidence_; + /** + * + * + *
+     * Confidence that the label is accurate. Range: [0, 1].
+     * 
+ * + * float confidence = 2; + */ + public float getConfidence() { + return confidence_; + } + /** + * + * + *
+     * Confidence that the label is accurate. Range: [0, 1].
+     * 
+ * + * float confidence = 2; + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Confidence that the label is accurate. Range: [0, 1].
+     * 
+ * + * float confidence = 2; + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.LabelSegment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.LabelSegment) + private static final com.google.cloud.videointelligence.v1p3beta1.LabelSegment DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.videointelligence.v1p3beta1.LabelSegment(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.LabelSegment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LabelSegment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LabelSegment(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.LabelSegment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelSegmentOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelSegmentOrBuilder.java new file mode 100644 index 000000000000..53cb2e180413 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelSegmentOrBuilder.java @@ -0,0 +1,52 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface LabelSegmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.LabelSegment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Video segment where a label was detected.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1; + */ + boolean hasSegment(); + /** + * + * + *
+   * Video segment where a label was detected.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1; + */ + com.google.cloud.videointelligence.v1p3beta1.VideoSegment getSegment(); + /** + * + * + *
+   * Video segment where a label was detected.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1; + */ + com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder getSegmentOrBuilder(); + + /** + * + * + *
+   * Confidence that the label is accurate. Range: [0, 1].
+   * 
+ * + * float confidence = 2; + */ + float getConfidence(); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/Likelihood.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/Likelihood.java new file mode 100644 index 000000000000..f14fecb78b5f --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/Likelihood.java @@ -0,0 +1,218 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Bucketized representation of likelihood.
+ * 
+ * + * Protobuf enum {@code google.cloud.videointelligence.v1p3beta1.Likelihood} + */ +public enum Likelihood implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified likelihood.
+   * 
+ * + * LIKELIHOOD_UNSPECIFIED = 0; + */ + LIKELIHOOD_UNSPECIFIED(0), + /** + * + * + *
+   * Very unlikely.
+   * 
+ * + * VERY_UNLIKELY = 1; + */ + VERY_UNLIKELY(1), + /** + * + * + *
+   * Unlikely.
+   * 
+ * + * UNLIKELY = 2; + */ + UNLIKELY(2), + /** + * + * + *
+   * Possible.
+   * 
+ * + * POSSIBLE = 3; + */ + POSSIBLE(3), + /** + * + * + *
+   * Likely.
+   * 
+ * + * LIKELY = 4; + */ + LIKELY(4), + /** + * + * + *
+   * Very likely.
+   * 
+ * + * VERY_LIKELY = 5; + */ + VERY_LIKELY(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Unspecified likelihood.
+   * 
+ * + * LIKELIHOOD_UNSPECIFIED = 0; + */ + public static final int LIKELIHOOD_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Very unlikely.
+   * 
+ * + * VERY_UNLIKELY = 1; + */ + public static final int VERY_UNLIKELY_VALUE = 1; + /** + * + * + *
+   * Unlikely.
+   * 
+ * + * UNLIKELY = 2; + */ + public static final int UNLIKELY_VALUE = 2; + /** + * + * + *
+   * Possible.
+   * 
+ * + * POSSIBLE = 3; + */ + public static final int POSSIBLE_VALUE = 3; + /** + * + * + *
+   * Likely.
+   * 
+ * + * LIKELY = 4; + */ + public static final int LIKELY_VALUE = 4; + /** + * + * + *
+   * Very likely.
+   * 
+ * + * VERY_LIKELY = 5; + */ + public static final int VERY_LIKELY_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static Likelihood valueOf(int value) { + return forNumber(value); + } + + public static Likelihood forNumber(int value) { + switch (value) { + case 0: + return LIKELIHOOD_UNSPECIFIED; + case 1: + return VERY_UNLIKELY; + case 2: + return UNLIKELY; + case 3: + return POSSIBLE; + case 4: + return LIKELY; + case 5: + return VERY_LIKELY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Likelihood findValueByNumber(int number) { + return Likelihood.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .getDescriptor() + .getEnumTypes() + .get(2); + } + + private static final Likelihood[] VALUES = values(); + + public static Likelihood valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Likelihood(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.videointelligence.v1p3beta1.Likelihood) +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/NormalizedBoundingBox.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/NormalizedBoundingBox.java new file mode 100644 index 000000000000..cbb0e2b0ab0f --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/NormalizedBoundingBox.java @@ -0,0 +1,786 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Normalized bounding box.
+ * The normalized vertex coordinates are relative to the original image.
+ * Range: [0, 1].
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox} + */ +public final class NormalizedBoundingBox extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox) + NormalizedBoundingBoxOrBuilder { + private static final long serialVersionUID = 0L; + // Use NormalizedBoundingBox.newBuilder() to construct. + private NormalizedBoundingBox(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NormalizedBoundingBox() { + left_ = 0F; + top_ = 0F; + right_ = 0F; + bottom_ = 0F; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private NormalizedBoundingBox( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + left_ = input.readFloat(); + break; + } + case 21: + { + top_ = input.readFloat(); + break; + } + case 29: + { + right_ = input.readFloat(); + break; + } + case 37: + { + bottom_ = input.readFloat(); + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_NormalizedBoundingBox_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_NormalizedBoundingBox_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox.class, + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox.Builder.class); + } + + public static final int LEFT_FIELD_NUMBER = 1; + private float left_; + /** + * + * + *
+   * Left X coordinate.
+   * 
+ * + * float left = 1; + */ + public float getLeft() { + return left_; + } + + public static final int TOP_FIELD_NUMBER = 2; + private float top_; + /** + * + * + *
+   * Top Y coordinate.
+   * 
+ * + * float top = 2; + */ + public float getTop() { + return top_; + } + + public static final int RIGHT_FIELD_NUMBER = 3; + private float right_; + /** + * + * + *
+   * Right X coordinate.
+   * 
+ * + * float right = 3; + */ + public float getRight() { + return right_; + } + + public static final int BOTTOM_FIELD_NUMBER = 4; + private float bottom_; + /** + * + * + *
+   * Bottom Y coordinate.
+   * 
+ * + * float bottom = 4; + */ + public float getBottom() { + return bottom_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (left_ != 0F) { + output.writeFloat(1, left_); + } + if (top_ != 0F) { + output.writeFloat(2, top_); + } + if (right_ != 0F) { + output.writeFloat(3, right_); + } + if (bottom_ != 0F) { + output.writeFloat(4, bottom_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (left_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, left_); + } + if (top_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, top_); + } + if (right_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, right_); + } + if (bottom_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, bottom_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox other = + (com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox) obj; + + boolean result = true; + result = + result + && (java.lang.Float.floatToIntBits(getLeft()) + == java.lang.Float.floatToIntBits(other.getLeft())); + result = + result + && (java.lang.Float.floatToIntBits(getTop()) + == java.lang.Float.floatToIntBits(other.getTop())); + result = + result + && (java.lang.Float.floatToIntBits(getRight()) + == java.lang.Float.floatToIntBits(other.getRight())); + result = + result + && (java.lang.Float.floatToIntBits(getBottom()) + == java.lang.Float.floatToIntBits(other.getBottom())); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LEFT_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getLeft()); + hash = (37 * hash) + TOP_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getTop()); + hash = (37 * hash) + RIGHT_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getRight()); + hash = (37 * hash) + BOTTOM_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getBottom()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Normalized bounding box.
+   * The normalized vertex coordinates are relative to the original image.
+   * Range: [0, 1].
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox) + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBoxOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_NormalizedBoundingBox_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_NormalizedBoundingBox_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox.class, + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox.Builder.class); + } + + // Construct using + // com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + left_ = 0F; + + top_ = 0F; + + right_ = 0F; + + bottom_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_NormalizedBoundingBox_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox + getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox build() { + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox result = + new com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox(this); + result.left_ = left_; + result.top_ = top_; + result.right_ = right_; + result.bottom_ = bottom_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox) { + return mergeFrom( + (com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox other) { + if (other + == com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox + .getDefaultInstance()) return this; + if (other.getLeft() != 0F) { + setLeft(other.getLeft()); + } + if (other.getTop() != 0F) { + setTop(other.getTop()); + } + if (other.getRight() != 0F) { + setRight(other.getRight()); + } + if (other.getBottom() != 0F) { + setBottom(other.getBottom()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float left_; + /** + * + * + *
+     * Left X coordinate.
+     * 
+ * + * float left = 1; + */ + public float getLeft() { + return left_; + } + /** + * + * + *
+     * Left X coordinate.
+     * 
+ * + * float left = 1; + */ + public Builder setLeft(float value) { + + left_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Left X coordinate.
+     * 
+ * + * float left = 1; + */ + public Builder clearLeft() { + + left_ = 0F; + onChanged(); + return this; + } + + private float top_; + /** + * + * + *
+     * Top Y coordinate.
+     * 
+ * + * float top = 2; + */ + public float getTop() { + return top_; + } + /** + * + * + *
+     * Top Y coordinate.
+     * 
+ * + * float top = 2; + */ + public Builder setTop(float value) { + + top_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Top Y coordinate.
+     * 
+ * + * float top = 2; + */ + public Builder clearTop() { + + top_ = 0F; + onChanged(); + return this; + } + + private float right_; + /** + * + * + *
+     * Right X coordinate.
+     * 
+ * + * float right = 3; + */ + public float getRight() { + return right_; + } + /** + * + * + *
+     * Right X coordinate.
+     * 
+ * + * float right = 3; + */ + public Builder setRight(float value) { + + right_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Right X coordinate.
+     * 
+ * + * float right = 3; + */ + public Builder clearRight() { + + right_ = 0F; + onChanged(); + return this; + } + + private float bottom_; + /** + * + * + *
+     * Bottom Y coordinate.
+     * 
+ * + * float bottom = 4; + */ + public float getBottom() { + return bottom_; + } + /** + * + * + *
+     * Bottom Y coordinate.
+     * 
+ * + * float bottom = 4; + */ + public Builder setBottom(float value) { + + bottom_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Bottom Y coordinate.
+     * 
+ * + * float bottom = 4; + */ + public Builder clearBottom() { + + bottom_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox) + private static final com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NormalizedBoundingBox parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NormalizedBoundingBox(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/NormalizedBoundingBoxOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/NormalizedBoundingBoxOrBuilder.java new file mode 100644 index 000000000000..c45f157893a9 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/NormalizedBoundingBoxOrBuilder.java @@ -0,0 +1,54 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface NormalizedBoundingBoxOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Left X coordinate.
+   * 
+ * + * float left = 1; + */ + float getLeft(); + + /** + * + * + *
+   * Top Y coordinate.
+   * 
+ * + * float top = 2; + */ + float getTop(); + + /** + * + * + *
+   * Right X coordinate.
+   * 
+ * + * float right = 3; + */ + float getRight(); + + /** + * + * + *
+   * Bottom Y coordinate.
+   * 
+ * + * float bottom = 4; + */ + float getBottom(); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/NormalizedBoundingPoly.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/NormalizedBoundingPoly.java new file mode 100644 index 000000000000..3529ba0b3c75 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/NormalizedBoundingPoly.java @@ -0,0 +1,1009 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Normalized bounding polygon for text (that might not be aligned with axis).
+ * Contains list of the corner points in clockwise order starting from
+ * top-left corner. For example, for a rectangular bounding box:
+ * When the text is horizontal it might look like:
+ *         0----1
+ *         |    |
+ *         3----2
+ * When it's clockwise rotated 180 degrees around the top-left corner it
+ * becomes:
+ *         2----3
+ *         |    |
+ *         1----0
+ * and the vertex order will still be (0, 1, 2, 3). Note that values can be less
+ * than 0, or greater than 1 due to trignometric calculations for location of
+ * the box.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly} + */ +public final class NormalizedBoundingPoly extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly) + NormalizedBoundingPolyOrBuilder { + private static final long serialVersionUID = 0L; + // Use NormalizedBoundingPoly.newBuilder() to construct. + private NormalizedBoundingPoly(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NormalizedBoundingPoly() { + vertices_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private NormalizedBoundingPoly( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + vertices_ = + new java.util.ArrayList< + com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex>(); + mutable_bitField0_ |= 0x00000001; + } + vertices_.add( + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + vertices_ = java.util.Collections.unmodifiableList(vertices_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_NormalizedBoundingPoly_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_NormalizedBoundingPoly_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly.class, + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly.Builder.class); + } + + public static final int VERTICES_FIELD_NUMBER = 1; + private java.util.List vertices_; + /** + * + * + *
+   * Normalized vertices of the bounding polygon.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.NormalizedVertex vertices = 1; + */ + public java.util.List + getVerticesList() { + return vertices_; + } + /** + * + * + *
+   * Normalized vertices of the bounding polygon.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.NormalizedVertex vertices = 1; + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.NormalizedVertexOrBuilder> + getVerticesOrBuilderList() { + return vertices_; + } + /** + * + * + *
+   * Normalized vertices of the bounding polygon.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.NormalizedVertex vertices = 1; + */ + public int getVerticesCount() { + return vertices_.size(); + } + /** + * + * + *
+   * Normalized vertices of the bounding polygon.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.NormalizedVertex vertices = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex getVertices(int index) { + return vertices_.get(index); + } + /** + * + * + *
+   * Normalized vertices of the bounding polygon.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.NormalizedVertex vertices = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.NormalizedVertexOrBuilder + getVerticesOrBuilder(int index) { + return vertices_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < vertices_.size(); i++) { + output.writeMessage(1, vertices_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < vertices_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, vertices_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly other = + (com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly) obj; + + boolean result = true; + result = result && getVerticesList().equals(other.getVerticesList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getVerticesCount() > 0) { + hash = (37 * hash) + VERTICES_FIELD_NUMBER; + hash = (53 * hash) + getVerticesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Normalized bounding polygon for text (that might not be aligned with axis).
+   * Contains list of the corner points in clockwise order starting from
+   * top-left corner. For example, for a rectangular bounding box:
+   * When the text is horizontal it might look like:
+   *         0----1
+   *         |    |
+   *         3----2
+   * When it's clockwise rotated 180 degrees around the top-left corner it
+   * becomes:
+   *         2----3
+   *         |    |
+   *         1----0
+   * and the vertex order will still be (0, 1, 2, 3). Note that values can be less
+   * than 0, or greater than 1 due to trignometric calculations for location of
+   * the box.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly) + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPolyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_NormalizedBoundingPoly_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_NormalizedBoundingPoly_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly.class, + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly.Builder.class); + } + + // Construct using + // com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getVerticesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (verticesBuilder_ == null) { + vertices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + verticesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_NormalizedBoundingPoly_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly + getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly build() { + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly result = + new com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly(this); + int from_bitField0_ = bitField0_; + if (verticesBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + vertices_ = java.util.Collections.unmodifiableList(vertices_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.vertices_ = vertices_; + } else { + result.vertices_ = verticesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly) { + return mergeFrom( + (com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly other) { + if (other + == com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly + .getDefaultInstance()) return this; + if (verticesBuilder_ == null) { + if (!other.vertices_.isEmpty()) { + if (vertices_.isEmpty()) { + vertices_ = other.vertices_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureVerticesIsMutable(); + vertices_.addAll(other.vertices_); + } + onChanged(); + } + } else { + if (!other.vertices_.isEmpty()) { + if (verticesBuilder_.isEmpty()) { + verticesBuilder_.dispose(); + verticesBuilder_ = null; + vertices_ = other.vertices_; + bitField0_ = (bitField0_ & ~0x00000001); + verticesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getVerticesFieldBuilder() + : null; + } else { + verticesBuilder_.addAllMessages(other.vertices_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + vertices_ = java.util.Collections.emptyList(); + + private void ensureVerticesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + vertices_ = + new java.util.ArrayList( + vertices_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex, + com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex.Builder, + com.google.cloud.videointelligence.v1p3beta1.NormalizedVertexOrBuilder> + verticesBuilder_; + + /** + * + * + *
+     * Normalized vertices of the bounding polygon.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.NormalizedVertex vertices = 1; + * + */ + public java.util.List + getVerticesList() { + if (verticesBuilder_ == null) { + return java.util.Collections.unmodifiableList(vertices_); + } else { + return verticesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Normalized vertices of the bounding polygon.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.NormalizedVertex vertices = 1; + * + */ + public int getVerticesCount() { + if (verticesBuilder_ == null) { + return vertices_.size(); + } else { + return verticesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Normalized vertices of the bounding polygon.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.NormalizedVertex vertices = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex getVertices(int index) { + if (verticesBuilder_ == null) { + return vertices_.get(index); + } else { + return verticesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Normalized vertices of the bounding polygon.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.NormalizedVertex vertices = 1; + * + */ + public Builder setVertices( + int index, com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex value) { + if (verticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVerticesIsMutable(); + vertices_.set(index, value); + onChanged(); + } else { + verticesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Normalized vertices of the bounding polygon.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.NormalizedVertex vertices = 1; + * + */ + public Builder setVertices( + int index, + com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex.Builder builderForValue) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.set(index, builderForValue.build()); + onChanged(); + } else { + verticesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Normalized vertices of the bounding polygon.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.NormalizedVertex vertices = 1; + * + */ + public Builder addVertices( + com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex value) { + if (verticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVerticesIsMutable(); + vertices_.add(value); + onChanged(); + } else { + verticesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Normalized vertices of the bounding polygon.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.NormalizedVertex vertices = 1; + * + */ + public Builder addVertices( + int index, com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex value) { + if (verticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVerticesIsMutable(); + vertices_.add(index, value); + onChanged(); + } else { + verticesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Normalized vertices of the bounding polygon.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.NormalizedVertex vertices = 1; + * + */ + public Builder addVertices( + com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex.Builder builderForValue) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.add(builderForValue.build()); + onChanged(); + } else { + verticesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Normalized vertices of the bounding polygon.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.NormalizedVertex vertices = 1; + * + */ + public Builder addVertices( + int index, + com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex.Builder builderForValue) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.add(index, builderForValue.build()); + onChanged(); + } else { + verticesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Normalized vertices of the bounding polygon.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.NormalizedVertex vertices = 1; + * + */ + public Builder addAllVertices( + java.lang.Iterable + values) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, vertices_); + onChanged(); + } else { + verticesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Normalized vertices of the bounding polygon.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.NormalizedVertex vertices = 1; + * + */ + public Builder clearVertices() { + if (verticesBuilder_ == null) { + vertices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + verticesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Normalized vertices of the bounding polygon.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.NormalizedVertex vertices = 1; + * + */ + public Builder removeVertices(int index) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.remove(index); + onChanged(); + } else { + verticesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Normalized vertices of the bounding polygon.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.NormalizedVertex vertices = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex.Builder getVerticesBuilder( + int index) { + return getVerticesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Normalized vertices of the bounding polygon.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.NormalizedVertex vertices = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.NormalizedVertexOrBuilder + getVerticesOrBuilder(int index) { + if (verticesBuilder_ == null) { + return vertices_.get(index); + } else { + return verticesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Normalized vertices of the bounding polygon.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.NormalizedVertex vertices = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.NormalizedVertexOrBuilder> + getVerticesOrBuilderList() { + if (verticesBuilder_ != null) { + return verticesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(vertices_); + } + } + /** + * + * + *
+     * Normalized vertices of the bounding polygon.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.NormalizedVertex vertices = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex.Builder + addVerticesBuilder() { + return getVerticesFieldBuilder() + .addBuilder( + com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex.getDefaultInstance()); + } + /** + * + * + *
+     * Normalized vertices of the bounding polygon.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.NormalizedVertex vertices = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex.Builder addVerticesBuilder( + int index) { + return getVerticesFieldBuilder() + .addBuilder( + index, + com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex.getDefaultInstance()); + } + /** + * + * + *
+     * Normalized vertices of the bounding polygon.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.NormalizedVertex vertices = 1; + * + */ + public java.util.List + getVerticesBuilderList() { + return getVerticesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex, + com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex.Builder, + com.google.cloud.videointelligence.v1p3beta1.NormalizedVertexOrBuilder> + getVerticesFieldBuilder() { + if (verticesBuilder_ == null) { + verticesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex, + com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex.Builder, + com.google.cloud.videointelligence.v1p3beta1.NormalizedVertexOrBuilder>( + vertices_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + vertices_ = null; + } + return verticesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly) + private static final com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NormalizedBoundingPoly parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NormalizedBoundingPoly(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/NormalizedBoundingPolyOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/NormalizedBoundingPolyOrBuilder.java new file mode 100644 index 000000000000..21edfc2c32bf --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/NormalizedBoundingPolyOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface NormalizedBoundingPolyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Normalized vertices of the bounding polygon.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.NormalizedVertex vertices = 1; + */ + java.util.List getVerticesList(); + /** + * + * + *
+   * Normalized vertices of the bounding polygon.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.NormalizedVertex vertices = 1; + */ + com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex getVertices(int index); + /** + * + * + *
+   * Normalized vertices of the bounding polygon.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.NormalizedVertex vertices = 1; + */ + int getVerticesCount(); + /** + * + * + *
+   * Normalized vertices of the bounding polygon.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.NormalizedVertex vertices = 1; + */ + java.util.List + getVerticesOrBuilderList(); + /** + * + * + *
+   * Normalized vertices of the bounding polygon.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.NormalizedVertex vertices = 1; + */ + com.google.cloud.videointelligence.v1p3beta1.NormalizedVertexOrBuilder getVerticesOrBuilder( + int index); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/NormalizedVertex.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/NormalizedVertex.java new file mode 100644 index 000000000000..9dc80bce9e23 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/NormalizedVertex.java @@ -0,0 +1,613 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * A vertex represents a 2D point in the image.
+ * NOTE: the normalized vertex coordinates are relative to the original image
+ * and range from 0 to 1.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.NormalizedVertex} + */ +public final class NormalizedVertex extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.NormalizedVertex) + NormalizedVertexOrBuilder { + private static final long serialVersionUID = 0L; + // Use NormalizedVertex.newBuilder() to construct. + private NormalizedVertex(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NormalizedVertex() { + x_ = 0F; + y_ = 0F; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private NormalizedVertex( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + x_ = input.readFloat(); + break; + } + case 21: + { + y_ = input.readFloat(); + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_NormalizedVertex_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_NormalizedVertex_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex.class, + com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex.Builder.class); + } + + public static final int X_FIELD_NUMBER = 1; + private float x_; + /** + * + * + *
+   * X coordinate.
+   * 
+ * + * float x = 1; + */ + public float getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 2; + private float y_; + /** + * + * + *
+   * Y coordinate.
+   * 
+ * + * float y = 2; + */ + public float getY() { + return y_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (x_ != 0F) { + output.writeFloat(1, x_); + } + if (y_ != 0F) { + output.writeFloat(2, y_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (x_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, x_); + } + if (y_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, y_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex other = + (com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex) obj; + + boolean result = true; + result = + result + && (java.lang.Float.floatToIntBits(getX()) + == java.lang.Float.floatToIntBits(other.getX())); + result = + result + && (java.lang.Float.floatToIntBits(getY()) + == java.lang.Float.floatToIntBits(other.getY())); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + X_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getX()); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getY()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A vertex represents a 2D point in the image.
+   * NOTE: the normalized vertex coordinates are relative to the original image
+   * and range from 0 to 1.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.NormalizedVertex} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.NormalizedVertex) + com.google.cloud.videointelligence.v1p3beta1.NormalizedVertexOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_NormalizedVertex_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_NormalizedVertex_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex.class, + com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex.Builder.class); + } + + // Construct using com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + x_ = 0F; + + y_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_NormalizedVertex_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex + getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex build() { + com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex result = + new com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex(this); + result.x_ = x_; + result.y_ = y_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex) { + return mergeFrom((com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex other) { + if (other + == com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex.getDefaultInstance()) + return this; + if (other.getX() != 0F) { + setX(other.getX()); + } + if (other.getY() != 0F) { + setY(other.getY()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float x_; + /** + * + * + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + */ + public float getX() { + return x_; + } + /** + * + * + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + */ + public Builder setX(float value) { + + x_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + */ + public Builder clearX() { + + x_ = 0F; + onChanged(); + return this; + } + + private float y_; + /** + * + * + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + */ + public float getY() { + return y_; + } + /** + * + * + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + */ + public Builder setY(float value) { + + y_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + */ + public Builder clearY() { + + y_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.NormalizedVertex) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.NormalizedVertex) + private static final com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NormalizedVertex parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NormalizedVertex(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.NormalizedVertex getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/NormalizedVertexOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/NormalizedVertexOrBuilder.java new file mode 100644 index 000000000000..d104a468bf6f --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/NormalizedVertexOrBuilder.java @@ -0,0 +1,32 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface NormalizedVertexOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.NormalizedVertex) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * X coordinate.
+   * 
+ * + * float x = 1; + */ + float getX(); + + /** + * + * + *
+   * Y coordinate.
+   * 
+ * + * float y = 2; + */ + float getY(); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ObjectTrackingAnnotation.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ObjectTrackingAnnotation.java new file mode 100644 index 000000000000..5a80eda4f7b7 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ObjectTrackingAnnotation.java @@ -0,0 +1,1903 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Annotations corresponding to one tracked object.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation} + */ +public final class ObjectTrackingAnnotation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation) + ObjectTrackingAnnotationOrBuilder { + private static final long serialVersionUID = 0L; + // Use ObjectTrackingAnnotation.newBuilder() to construct. + private ObjectTrackingAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ObjectTrackingAnnotation() { + confidence_ = 0F; + frames_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ObjectTrackingAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.videointelligence.v1p3beta1.Entity.Builder subBuilder = null; + if (entity_ != null) { + subBuilder = entity_.toBuilder(); + } + entity_ = + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.Entity.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(entity_); + entity_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + frames_ = + new java.util.ArrayList< + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame>(); + mutable_bitField0_ |= 0x00000004; + } + frames_.add( + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame.parser(), + extensionRegistry)); + break; + } + case 26: + { + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder subBuilder = null; + if (trackInfoCase_ == 3) { + subBuilder = + ((com.google.cloud.videointelligence.v1p3beta1.VideoSegment) trackInfo_) + .toBuilder(); + } + trackInfo_ = + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.videointelligence.v1p3beta1.VideoSegment) trackInfo_); + trackInfo_ = subBuilder.buildPartial(); + } + trackInfoCase_ = 3; + break; + } + case 37: + { + confidence_ = input.readFloat(); + break; + } + case 40: + { + trackInfoCase_ = 5; + trackInfo_ = input.readInt64(); + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + frames_ = java.util.Collections.unmodifiableList(frames_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_ObjectTrackingAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_ObjectTrackingAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.class, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.Builder.class); + } + + private int bitField0_; + private int trackInfoCase_ = 0; + private java.lang.Object trackInfo_; + + public enum TrackInfoCase implements com.google.protobuf.Internal.EnumLite { + SEGMENT(3), + TRACK_ID(5), + TRACKINFO_NOT_SET(0); + private final int value; + + private TrackInfoCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static TrackInfoCase valueOf(int value) { + return forNumber(value); + } + + public static TrackInfoCase forNumber(int value) { + switch (value) { + case 3: + return SEGMENT; + case 5: + return TRACK_ID; + case 0: + return TRACKINFO_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TrackInfoCase getTrackInfoCase() { + return TrackInfoCase.forNumber(trackInfoCase_); + } + + public static final int ENTITY_FIELD_NUMBER = 1; + private com.google.cloud.videointelligence.v1p3beta1.Entity entity_; + /** + * + * + *
+   * Entity to specify the object category that this track is labeled as.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Entity entity = 1; + */ + public boolean hasEntity() { + return entity_ != null; + } + /** + * + * + *
+   * Entity to specify the object category that this track is labeled as.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Entity entity = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.Entity getEntity() { + return entity_ == null + ? com.google.cloud.videointelligence.v1p3beta1.Entity.getDefaultInstance() + : entity_; + } + /** + * + * + *
+   * Entity to specify the object category that this track is labeled as.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Entity entity = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.EntityOrBuilder getEntityOrBuilder() { + return getEntity(); + } + + public static final int CONFIDENCE_FIELD_NUMBER = 4; + private float confidence_; + /** + * + * + *
+   * Object category's labeling confidence of this track.
+   * 
+ * + * float confidence = 4; + */ + public float getConfidence() { + return confidence_; + } + + public static final int FRAMES_FIELD_NUMBER = 2; + private java.util.List frames_; + /** + * + * + *
+   * Information corresponding to all frames where this object track appears.
+   * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
+   * messages in frames.
+   * Streaming mode: it can only be one ObjectTrackingFrame message in frames.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame frames = 2; + */ + public java.util.List + getFramesList() { + return frames_; + } + /** + * + * + *
+   * Information corresponding to all frames where this object track appears.
+   * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
+   * messages in frames.
+   * Streaming mode: it can only be one ObjectTrackingFrame message in frames.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame frames = 2; + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrameOrBuilder> + getFramesOrBuilderList() { + return frames_; + } + /** + * + * + *
+   * Information corresponding to all frames where this object track appears.
+   * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
+   * messages in frames.
+   * Streaming mode: it can only be one ObjectTrackingFrame message in frames.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame frames = 2; + */ + public int getFramesCount() { + return frames_.size(); + } + /** + * + * + *
+   * Information corresponding to all frames where this object track appears.
+   * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
+   * messages in frames.
+   * Streaming mode: it can only be one ObjectTrackingFrame message in frames.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame frames = 2; + */ + public com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame getFrames(int index) { + return frames_.get(index); + } + /** + * + * + *
+   * Information corresponding to all frames where this object track appears.
+   * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
+   * messages in frames.
+   * Streaming mode: it can only be one ObjectTrackingFrame message in frames.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame frames = 2; + */ + public com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrameOrBuilder + getFramesOrBuilder(int index) { + return frames_.get(index); + } + + public static final int SEGMENT_FIELD_NUMBER = 3; + /** + * + * + *
+   * Non-streaming batch mode ONLY.
+   * Each object track corresponds to one video segment where it appears.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 3; + */ + public boolean hasSegment() { + return trackInfoCase_ == 3; + } + /** + * + * + *
+   * Non-streaming batch mode ONLY.
+   * Each object track corresponds to one video segment where it appears.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 3; + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegment getSegment() { + if (trackInfoCase_ == 3) { + return (com.google.cloud.videointelligence.v1p3beta1.VideoSegment) trackInfo_; + } + return com.google.cloud.videointelligence.v1p3beta1.VideoSegment.getDefaultInstance(); + } + /** + * + * + *
+   * Non-streaming batch mode ONLY.
+   * Each object track corresponds to one video segment where it appears.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 3; + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder getSegmentOrBuilder() { + if (trackInfoCase_ == 3) { + return (com.google.cloud.videointelligence.v1p3beta1.VideoSegment) trackInfo_; + } + return com.google.cloud.videointelligence.v1p3beta1.VideoSegment.getDefaultInstance(); + } + + public static final int TRACK_ID_FIELD_NUMBER = 5; + /** + * + * + *
+   * Streaming mode ONLY.
+   * In streaming mode, we do not know the end time of a tracked object
+   * before it is completed. Hence, there is no VideoSegment info returned.
+   * Instead, we provide a unique identifiable integer track_id so that
+   * the customers can correlate the results of the ongoing
+   * ObjectTrackAnnotation of the same track_id over time.
+   * 
+ * + * int64 track_id = 5; + */ + public long getTrackId() { + if (trackInfoCase_ == 5) { + return (java.lang.Long) trackInfo_; + } + return 0L; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (entity_ != null) { + output.writeMessage(1, getEntity()); + } + for (int i = 0; i < frames_.size(); i++) { + output.writeMessage(2, frames_.get(i)); + } + if (trackInfoCase_ == 3) { + output.writeMessage( + 3, (com.google.cloud.videointelligence.v1p3beta1.VideoSegment) trackInfo_); + } + if (confidence_ != 0F) { + output.writeFloat(4, confidence_); + } + if (trackInfoCase_ == 5) { + output.writeInt64(5, (long) ((java.lang.Long) trackInfo_)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (entity_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEntity()); + } + for (int i = 0; i < frames_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, frames_.get(i)); + } + if (trackInfoCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.videointelligence.v1p3beta1.VideoSegment) trackInfo_); + } + if (confidence_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, confidence_); + } + if (trackInfoCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 5, (long) ((java.lang.Long) trackInfo_)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation other = + (com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation) obj; + + boolean result = true; + result = result && (hasEntity() == other.hasEntity()); + if (hasEntity()) { + result = result && getEntity().equals(other.getEntity()); + } + result = + result + && (java.lang.Float.floatToIntBits(getConfidence()) + == java.lang.Float.floatToIntBits(other.getConfidence())); + result = result && getFramesList().equals(other.getFramesList()); + result = result && getTrackInfoCase().equals(other.getTrackInfoCase()); + if (!result) return false; + switch (trackInfoCase_) { + case 3: + result = result && getSegment().equals(other.getSegment()); + break; + case 5: + result = result && (getTrackId() == other.getTrackId()); + break; + case 0: + default: + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEntity()) { + hash = (37 * hash) + ENTITY_FIELD_NUMBER; + hash = (53 * hash) + getEntity().hashCode(); + } + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidence()); + if (getFramesCount() > 0) { + hash = (37 * hash) + FRAMES_FIELD_NUMBER; + hash = (53 * hash) + getFramesList().hashCode(); + } + switch (trackInfoCase_) { + case 3: + hash = (37 * hash) + SEGMENT_FIELD_NUMBER; + hash = (53 * hash) + getSegment().hashCode(); + break; + case 5: + hash = (37 * hash) + TRACK_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTrackId()); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Annotations corresponding to one tracked object.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation) + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_ObjectTrackingAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_ObjectTrackingAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.class, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.Builder.class); + } + + // Construct using + // com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getFramesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (entityBuilder_ == null) { + entity_ = null; + } else { + entity_ = null; + entityBuilder_ = null; + } + confidence_ = 0F; + + if (framesBuilder_ == null) { + frames_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + framesBuilder_.clear(); + } + trackInfoCase_ = 0; + trackInfo_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_ObjectTrackingAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation + getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation build() { + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation result = + new com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (entityBuilder_ == null) { + result.entity_ = entity_; + } else { + result.entity_ = entityBuilder_.build(); + } + result.confidence_ = confidence_; + if (framesBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + frames_ = java.util.Collections.unmodifiableList(frames_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.frames_ = frames_; + } else { + result.frames_ = framesBuilder_.build(); + } + if (trackInfoCase_ == 3) { + if (segmentBuilder_ == null) { + result.trackInfo_ = trackInfo_; + } else { + result.trackInfo_ = segmentBuilder_.build(); + } + } + if (trackInfoCase_ == 5) { + result.trackInfo_ = trackInfo_; + } + result.bitField0_ = to_bitField0_; + result.trackInfoCase_ = trackInfoCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation) { + return mergeFrom( + (com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation other) { + if (other + == com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation + .getDefaultInstance()) return this; + if (other.hasEntity()) { + mergeEntity(other.getEntity()); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + if (framesBuilder_ == null) { + if (!other.frames_.isEmpty()) { + if (frames_.isEmpty()) { + frames_ = other.frames_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureFramesIsMutable(); + frames_.addAll(other.frames_); + } + onChanged(); + } + } else { + if (!other.frames_.isEmpty()) { + if (framesBuilder_.isEmpty()) { + framesBuilder_.dispose(); + framesBuilder_ = null; + frames_ = other.frames_; + bitField0_ = (bitField0_ & ~0x00000004); + framesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFramesFieldBuilder() + : null; + } else { + framesBuilder_.addAllMessages(other.frames_); + } + } + } + switch (other.getTrackInfoCase()) { + case SEGMENT: + { + mergeSegment(other.getSegment()); + break; + } + case TRACK_ID: + { + setTrackId(other.getTrackId()); + break; + } + case TRACKINFO_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int trackInfoCase_ = 0; + private java.lang.Object trackInfo_; + + public TrackInfoCase getTrackInfoCase() { + return TrackInfoCase.forNumber(trackInfoCase_); + } + + public Builder clearTrackInfo() { + trackInfoCase_ = 0; + trackInfo_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.cloud.videointelligence.v1p3beta1.Entity entity_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.Entity, + com.google.cloud.videointelligence.v1p3beta1.Entity.Builder, + com.google.cloud.videointelligence.v1p3beta1.EntityOrBuilder> + entityBuilder_; + /** + * + * + *
+     * Entity to specify the object category that this track is labeled as.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Entity entity = 1; + */ + public boolean hasEntity() { + return entityBuilder_ != null || entity_ != null; + } + /** + * + * + *
+     * Entity to specify the object category that this track is labeled as.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Entity entity = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.Entity getEntity() { + if (entityBuilder_ == null) { + return entity_ == null + ? com.google.cloud.videointelligence.v1p3beta1.Entity.getDefaultInstance() + : entity_; + } else { + return entityBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Entity to specify the object category that this track is labeled as.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Entity entity = 1; + */ + public Builder setEntity(com.google.cloud.videointelligence.v1p3beta1.Entity value) { + if (entityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + entity_ = value; + onChanged(); + } else { + entityBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Entity to specify the object category that this track is labeled as.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Entity entity = 1; + */ + public Builder setEntity( + com.google.cloud.videointelligence.v1p3beta1.Entity.Builder builderForValue) { + if (entityBuilder_ == null) { + entity_ = builderForValue.build(); + onChanged(); + } else { + entityBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Entity to specify the object category that this track is labeled as.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Entity entity = 1; + */ + public Builder mergeEntity(com.google.cloud.videointelligence.v1p3beta1.Entity value) { + if (entityBuilder_ == null) { + if (entity_ != null) { + entity_ = + com.google.cloud.videointelligence.v1p3beta1.Entity.newBuilder(entity_) + .mergeFrom(value) + .buildPartial(); + } else { + entity_ = value; + } + onChanged(); + } else { + entityBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Entity to specify the object category that this track is labeled as.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Entity entity = 1; + */ + public Builder clearEntity() { + if (entityBuilder_ == null) { + entity_ = null; + onChanged(); + } else { + entity_ = null; + entityBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Entity to specify the object category that this track is labeled as.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Entity entity = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.Entity.Builder getEntityBuilder() { + + onChanged(); + return getEntityFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Entity to specify the object category that this track is labeled as.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Entity entity = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.EntityOrBuilder getEntityOrBuilder() { + if (entityBuilder_ != null) { + return entityBuilder_.getMessageOrBuilder(); + } else { + return entity_ == null + ? com.google.cloud.videointelligence.v1p3beta1.Entity.getDefaultInstance() + : entity_; + } + } + /** + * + * + *
+     * Entity to specify the object category that this track is labeled as.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Entity entity = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.Entity, + com.google.cloud.videointelligence.v1p3beta1.Entity.Builder, + com.google.cloud.videointelligence.v1p3beta1.EntityOrBuilder> + getEntityFieldBuilder() { + if (entityBuilder_ == null) { + entityBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.Entity, + com.google.cloud.videointelligence.v1p3beta1.Entity.Builder, + com.google.cloud.videointelligence.v1p3beta1.EntityOrBuilder>( + getEntity(), getParentForChildren(), isClean()); + entity_ = null; + } + return entityBuilder_; + } + + private float confidence_; + /** + * + * + *
+     * Object category's labeling confidence of this track.
+     * 
+ * + * float confidence = 4; + */ + public float getConfidence() { + return confidence_; + } + /** + * + * + *
+     * Object category's labeling confidence of this track.
+     * 
+ * + * float confidence = 4; + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Object category's labeling confidence of this track.
+     * 
+ * + * float confidence = 4; + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + + private java.util.List + frames_ = java.util.Collections.emptyList(); + + private void ensureFramesIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + frames_ = + new java.util.ArrayList< + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame>(frames_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame.Builder, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrameOrBuilder> + framesBuilder_; + + /** + * + * + *
+     * Information corresponding to all frames where this object track appears.
+     * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
+     * messages in frames.
+     * Streaming mode: it can only be one ObjectTrackingFrame message in frames.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame frames = 2; + * + */ + public java.util.List + getFramesList() { + if (framesBuilder_ == null) { + return java.util.Collections.unmodifiableList(frames_); + } else { + return framesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Information corresponding to all frames where this object track appears.
+     * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
+     * messages in frames.
+     * Streaming mode: it can only be one ObjectTrackingFrame message in frames.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame frames = 2; + * + */ + public int getFramesCount() { + if (framesBuilder_ == null) { + return frames_.size(); + } else { + return framesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Information corresponding to all frames where this object track appears.
+     * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
+     * messages in frames.
+     * Streaming mode: it can only be one ObjectTrackingFrame message in frames.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame frames = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame getFrames(int index) { + if (framesBuilder_ == null) { + return frames_.get(index); + } else { + return framesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Information corresponding to all frames where this object track appears.
+     * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
+     * messages in frames.
+     * Streaming mode: it can only be one ObjectTrackingFrame message in frames.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame frames = 2; + * + */ + public Builder setFrames( + int index, com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame value) { + if (framesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFramesIsMutable(); + frames_.set(index, value); + onChanged(); + } else { + framesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Information corresponding to all frames where this object track appears.
+     * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
+     * messages in frames.
+     * Streaming mode: it can only be one ObjectTrackingFrame message in frames.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame frames = 2; + * + */ + public Builder setFrames( + int index, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame.Builder builderForValue) { + if (framesBuilder_ == null) { + ensureFramesIsMutable(); + frames_.set(index, builderForValue.build()); + onChanged(); + } else { + framesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Information corresponding to all frames where this object track appears.
+     * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
+     * messages in frames.
+     * Streaming mode: it can only be one ObjectTrackingFrame message in frames.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame frames = 2; + * + */ + public Builder addFrames( + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame value) { + if (framesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFramesIsMutable(); + frames_.add(value); + onChanged(); + } else { + framesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Information corresponding to all frames where this object track appears.
+     * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
+     * messages in frames.
+     * Streaming mode: it can only be one ObjectTrackingFrame message in frames.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame frames = 2; + * + */ + public Builder addFrames( + int index, com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame value) { + if (framesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFramesIsMutable(); + frames_.add(index, value); + onChanged(); + } else { + framesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Information corresponding to all frames where this object track appears.
+     * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
+     * messages in frames.
+     * Streaming mode: it can only be one ObjectTrackingFrame message in frames.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame frames = 2; + * + */ + public Builder addFrames( + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame.Builder builderForValue) { + if (framesBuilder_ == null) { + ensureFramesIsMutable(); + frames_.add(builderForValue.build()); + onChanged(); + } else { + framesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Information corresponding to all frames where this object track appears.
+     * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
+     * messages in frames.
+     * Streaming mode: it can only be one ObjectTrackingFrame message in frames.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame frames = 2; + * + */ + public Builder addFrames( + int index, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame.Builder builderForValue) { + if (framesBuilder_ == null) { + ensureFramesIsMutable(); + frames_.add(index, builderForValue.build()); + onChanged(); + } else { + framesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Information corresponding to all frames where this object track appears.
+     * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
+     * messages in frames.
+     * Streaming mode: it can only be one ObjectTrackingFrame message in frames.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame frames = 2; + * + */ + public Builder addAllFrames( + java.lang.Iterable< + ? extends com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame> + values) { + if (framesBuilder_ == null) { + ensureFramesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, frames_); + onChanged(); + } else { + framesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Information corresponding to all frames where this object track appears.
+     * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
+     * messages in frames.
+     * Streaming mode: it can only be one ObjectTrackingFrame message in frames.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame frames = 2; + * + */ + public Builder clearFrames() { + if (framesBuilder_ == null) { + frames_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + framesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Information corresponding to all frames where this object track appears.
+     * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
+     * messages in frames.
+     * Streaming mode: it can only be one ObjectTrackingFrame message in frames.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame frames = 2; + * + */ + public Builder removeFrames(int index) { + if (framesBuilder_ == null) { + ensureFramesIsMutable(); + frames_.remove(index); + onChanged(); + } else { + framesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Information corresponding to all frames where this object track appears.
+     * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
+     * messages in frames.
+     * Streaming mode: it can only be one ObjectTrackingFrame message in frames.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame frames = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame.Builder + getFramesBuilder(int index) { + return getFramesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Information corresponding to all frames where this object track appears.
+     * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
+     * messages in frames.
+     * Streaming mode: it can only be one ObjectTrackingFrame message in frames.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame frames = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrameOrBuilder + getFramesOrBuilder(int index) { + if (framesBuilder_ == null) { + return frames_.get(index); + } else { + return framesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Information corresponding to all frames where this object track appears.
+     * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
+     * messages in frames.
+     * Streaming mode: it can only be one ObjectTrackingFrame message in frames.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame frames = 2; + * + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrameOrBuilder> + getFramesOrBuilderList() { + if (framesBuilder_ != null) { + return framesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(frames_); + } + } + /** + * + * + *
+     * Information corresponding to all frames where this object track appears.
+     * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
+     * messages in frames.
+     * Streaming mode: it can only be one ObjectTrackingFrame message in frames.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame frames = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame.Builder + addFramesBuilder() { + return getFramesFieldBuilder() + .addBuilder( + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame + .getDefaultInstance()); + } + /** + * + * + *
+     * Information corresponding to all frames where this object track appears.
+     * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
+     * messages in frames.
+     * Streaming mode: it can only be one ObjectTrackingFrame message in frames.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame frames = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame.Builder + addFramesBuilder(int index) { + return getFramesFieldBuilder() + .addBuilder( + index, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame + .getDefaultInstance()); + } + /** + * + * + *
+     * Information corresponding to all frames where this object track appears.
+     * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
+     * messages in frames.
+     * Streaming mode: it can only be one ObjectTrackingFrame message in frames.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame frames = 2; + * + */ + public java.util.List + getFramesBuilderList() { + return getFramesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame.Builder, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrameOrBuilder> + getFramesFieldBuilder() { + if (framesBuilder_ == null) { + framesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame.Builder, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrameOrBuilder>( + frames_, + ((bitField0_ & 0x00000004) == 0x00000004), + getParentForChildren(), + isClean()); + frames_ = null; + } + return framesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.VideoSegment, + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder, + com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder> + segmentBuilder_; + /** + * + * + *
+     * Non-streaming batch mode ONLY.
+     * Each object track corresponds to one video segment where it appears.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 3; + */ + public boolean hasSegment() { + return trackInfoCase_ == 3; + } + /** + * + * + *
+     * Non-streaming batch mode ONLY.
+     * Each object track corresponds to one video segment where it appears.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 3; + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegment getSegment() { + if (segmentBuilder_ == null) { + if (trackInfoCase_ == 3) { + return (com.google.cloud.videointelligence.v1p3beta1.VideoSegment) trackInfo_; + } + return com.google.cloud.videointelligence.v1p3beta1.VideoSegment.getDefaultInstance(); + } else { + if (trackInfoCase_ == 3) { + return segmentBuilder_.getMessage(); + } + return com.google.cloud.videointelligence.v1p3beta1.VideoSegment.getDefaultInstance(); + } + } + /** + * + * + *
+     * Non-streaming batch mode ONLY.
+     * Each object track corresponds to one video segment where it appears.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 3; + */ + public Builder setSegment(com.google.cloud.videointelligence.v1p3beta1.VideoSegment value) { + if (segmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + trackInfo_ = value; + onChanged(); + } else { + segmentBuilder_.setMessage(value); + } + trackInfoCase_ = 3; + return this; + } + /** + * + * + *
+     * Non-streaming batch mode ONLY.
+     * Each object track corresponds to one video segment where it appears.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 3; + */ + public Builder setSegment( + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder builderForValue) { + if (segmentBuilder_ == null) { + trackInfo_ = builderForValue.build(); + onChanged(); + } else { + segmentBuilder_.setMessage(builderForValue.build()); + } + trackInfoCase_ = 3; + return this; + } + /** + * + * + *
+     * Non-streaming batch mode ONLY.
+     * Each object track corresponds to one video segment where it appears.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 3; + */ + public Builder mergeSegment(com.google.cloud.videointelligence.v1p3beta1.VideoSegment value) { + if (segmentBuilder_ == null) { + if (trackInfoCase_ == 3 + && trackInfo_ + != com.google.cloud.videointelligence.v1p3beta1.VideoSegment.getDefaultInstance()) { + trackInfo_ = + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.newBuilder( + (com.google.cloud.videointelligence.v1p3beta1.VideoSegment) trackInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + trackInfo_ = value; + } + onChanged(); + } else { + if (trackInfoCase_ == 3) { + segmentBuilder_.mergeFrom(value); + } + segmentBuilder_.setMessage(value); + } + trackInfoCase_ = 3; + return this; + } + /** + * + * + *
+     * Non-streaming batch mode ONLY.
+     * Each object track corresponds to one video segment where it appears.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 3; + */ + public Builder clearSegment() { + if (segmentBuilder_ == null) { + if (trackInfoCase_ == 3) { + trackInfoCase_ = 0; + trackInfo_ = null; + onChanged(); + } + } else { + if (trackInfoCase_ == 3) { + trackInfoCase_ = 0; + trackInfo_ = null; + } + segmentBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Non-streaming batch mode ONLY.
+     * Each object track corresponds to one video segment where it appears.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 3; + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder getSegmentBuilder() { + return getSegmentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Non-streaming batch mode ONLY.
+     * Each object track corresponds to one video segment where it appears.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 3; + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder + getSegmentOrBuilder() { + if ((trackInfoCase_ == 3) && (segmentBuilder_ != null)) { + return segmentBuilder_.getMessageOrBuilder(); + } else { + if (trackInfoCase_ == 3) { + return (com.google.cloud.videointelligence.v1p3beta1.VideoSegment) trackInfo_; + } + return com.google.cloud.videointelligence.v1p3beta1.VideoSegment.getDefaultInstance(); + } + } + /** + * + * + *
+     * Non-streaming batch mode ONLY.
+     * Each object track corresponds to one video segment where it appears.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.VideoSegment, + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder, + com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder> + getSegmentFieldBuilder() { + if (segmentBuilder_ == null) { + if (!(trackInfoCase_ == 3)) { + trackInfo_ = + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.getDefaultInstance(); + } + segmentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.VideoSegment, + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder, + com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder>( + (com.google.cloud.videointelligence.v1p3beta1.VideoSegment) trackInfo_, + getParentForChildren(), + isClean()); + trackInfo_ = null; + } + trackInfoCase_ = 3; + onChanged(); + ; + return segmentBuilder_; + } + + /** + * + * + *
+     * Streaming mode ONLY.
+     * In streaming mode, we do not know the end time of a tracked object
+     * before it is completed. Hence, there is no VideoSegment info returned.
+     * Instead, we provide a unique identifiable integer track_id so that
+     * the customers can correlate the results of the ongoing
+     * ObjectTrackAnnotation of the same track_id over time.
+     * 
+ * + * int64 track_id = 5; + */ + public long getTrackId() { + if (trackInfoCase_ == 5) { + return (java.lang.Long) trackInfo_; + } + return 0L; + } + /** + * + * + *
+     * Streaming mode ONLY.
+     * In streaming mode, we do not know the end time of a tracked object
+     * before it is completed. Hence, there is no VideoSegment info returned.
+     * Instead, we provide a unique identifiable integer track_id so that
+     * the customers can correlate the results of the ongoing
+     * ObjectTrackAnnotation of the same track_id over time.
+     * 
+ * + * int64 track_id = 5; + */ + public Builder setTrackId(long value) { + trackInfoCase_ = 5; + trackInfo_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Streaming mode ONLY.
+     * In streaming mode, we do not know the end time of a tracked object
+     * before it is completed. Hence, there is no VideoSegment info returned.
+     * Instead, we provide a unique identifiable integer track_id so that
+     * the customers can correlate the results of the ongoing
+     * ObjectTrackAnnotation of the same track_id over time.
+     * 
+ * + * int64 track_id = 5; + */ + public Builder clearTrackId() { + if (trackInfoCase_ == 5) { + trackInfoCase_ = 0; + trackInfo_ = null; + onChanged(); + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation) + private static final com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ObjectTrackingAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ObjectTrackingAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ObjectTrackingAnnotationOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ObjectTrackingAnnotationOrBuilder.java new file mode 100644 index 000000000000..ba25d626dc09 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ObjectTrackingAnnotationOrBuilder.java @@ -0,0 +1,174 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface ObjectTrackingAnnotationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Entity to specify the object category that this track is labeled as.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Entity entity = 1; + */ + boolean hasEntity(); + /** + * + * + *
+   * Entity to specify the object category that this track is labeled as.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Entity entity = 1; + */ + com.google.cloud.videointelligence.v1p3beta1.Entity getEntity(); + /** + * + * + *
+   * Entity to specify the object category that this track is labeled as.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.Entity entity = 1; + */ + com.google.cloud.videointelligence.v1p3beta1.EntityOrBuilder getEntityOrBuilder(); + + /** + * + * + *
+   * Object category's labeling confidence of this track.
+   * 
+ * + * float confidence = 4; + */ + float getConfidence(); + + /** + * + * + *
+   * Information corresponding to all frames where this object track appears.
+   * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
+   * messages in frames.
+   * Streaming mode: it can only be one ObjectTrackingFrame message in frames.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame frames = 2; + */ + java.util.List getFramesList(); + /** + * + * + *
+   * Information corresponding to all frames where this object track appears.
+   * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
+   * messages in frames.
+   * Streaming mode: it can only be one ObjectTrackingFrame message in frames.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame frames = 2; + */ + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame getFrames(int index); + /** + * + * + *
+   * Information corresponding to all frames where this object track appears.
+   * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
+   * messages in frames.
+   * Streaming mode: it can only be one ObjectTrackingFrame message in frames.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame frames = 2; + */ + int getFramesCount(); + /** + * + * + *
+   * Information corresponding to all frames where this object track appears.
+   * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
+   * messages in frames.
+   * Streaming mode: it can only be one ObjectTrackingFrame message in frames.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame frames = 2; + */ + java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrameOrBuilder> + getFramesOrBuilderList(); + /** + * + * + *
+   * Information corresponding to all frames where this object track appears.
+   * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
+   * messages in frames.
+   * Streaming mode: it can only be one ObjectTrackingFrame message in frames.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame frames = 2; + */ + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrameOrBuilder getFramesOrBuilder( + int index); + + /** + * + * + *
+   * Non-streaming batch mode ONLY.
+   * Each object track corresponds to one video segment where it appears.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 3; + */ + boolean hasSegment(); + /** + * + * + *
+   * Non-streaming batch mode ONLY.
+   * Each object track corresponds to one video segment where it appears.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 3; + */ + com.google.cloud.videointelligence.v1p3beta1.VideoSegment getSegment(); + /** + * + * + *
+   * Non-streaming batch mode ONLY.
+   * Each object track corresponds to one video segment where it appears.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 3; + */ + com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder getSegmentOrBuilder(); + + /** + * + * + *
+   * Streaming mode ONLY.
+   * In streaming mode, we do not know the end time of a tracked object
+   * before it is completed. Hence, there is no VideoSegment info returned.
+   * Instead, we provide a unique identifiable integer track_id so that
+   * the customers can correlate the results of the ongoing
+   * ObjectTrackAnnotation of the same track_id over time.
+   * 
+ * + * int64 track_id = 5; + */ + long getTrackId(); + + public com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.TrackInfoCase + getTrackInfoCase(); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ObjectTrackingFrame.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ObjectTrackingFrame.java new file mode 100644 index 000000000000..f293e743dc87 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ObjectTrackingFrame.java @@ -0,0 +1,1014 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Video frame level annotations for object detection and tracking. This field
+ * stores per frame location, time offset, and confidence.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame} + */ +public final class ObjectTrackingFrame extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame) + ObjectTrackingFrameOrBuilder { + private static final long serialVersionUID = 0L; + // Use ObjectTrackingFrame.newBuilder() to construct. + private ObjectTrackingFrame(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ObjectTrackingFrame() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ObjectTrackingFrame( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox.Builder + subBuilder = null; + if (normalizedBoundingBox_ != null) { + subBuilder = normalizedBoundingBox_.toBuilder(); + } + normalizedBoundingBox_ = + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(normalizedBoundingBox_); + normalizedBoundingBox_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (timeOffset_ != null) { + subBuilder = timeOffset_.toBuilder(); + } + timeOffset_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timeOffset_); + timeOffset_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_ObjectTrackingFrame_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_ObjectTrackingFrame_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame.class, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame.Builder.class); + } + + public static final int NORMALIZED_BOUNDING_BOX_FIELD_NUMBER = 1; + private com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox normalizedBoundingBox_; + /** + * + * + *
+   * The normalized bounding box location of this object track for the frame.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox normalized_bounding_box = 1; + * + */ + public boolean hasNormalizedBoundingBox() { + return normalizedBoundingBox_ != null; + } + /** + * + * + *
+   * The normalized bounding box location of this object track for the frame.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox normalized_bounding_box = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox + getNormalizedBoundingBox() { + return normalizedBoundingBox_ == null + ? com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox.getDefaultInstance() + : normalizedBoundingBox_; + } + /** + * + * + *
+   * The normalized bounding box location of this object track for the frame.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox normalized_bounding_box = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBoxOrBuilder + getNormalizedBoundingBoxOrBuilder() { + return getNormalizedBoundingBox(); + } + + public static final int TIME_OFFSET_FIELD_NUMBER = 2; + private com.google.protobuf.Duration timeOffset_; + /** + * + * + *
+   * The timestamp of the frame in microseconds.
+   * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public boolean hasTimeOffset() { + return timeOffset_ != null; + } + /** + * + * + *
+   * The timestamp of the frame in microseconds.
+   * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public com.google.protobuf.Duration getTimeOffset() { + return timeOffset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeOffset_; + } + /** + * + * + *
+   * The timestamp of the frame in microseconds.
+   * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public com.google.protobuf.DurationOrBuilder getTimeOffsetOrBuilder() { + return getTimeOffset(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (normalizedBoundingBox_ != null) { + output.writeMessage(1, getNormalizedBoundingBox()); + } + if (timeOffset_ != null) { + output.writeMessage(2, getTimeOffset()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (normalizedBoundingBox_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getNormalizedBoundingBox()); + } + if (timeOffset_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTimeOffset()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame other = + (com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame) obj; + + boolean result = true; + result = result && (hasNormalizedBoundingBox() == other.hasNormalizedBoundingBox()); + if (hasNormalizedBoundingBox()) { + result = result && getNormalizedBoundingBox().equals(other.getNormalizedBoundingBox()); + } + result = result && (hasTimeOffset() == other.hasTimeOffset()); + if (hasTimeOffset()) { + result = result && getTimeOffset().equals(other.getTimeOffset()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasNormalizedBoundingBox()) { + hash = (37 * hash) + NORMALIZED_BOUNDING_BOX_FIELD_NUMBER; + hash = (53 * hash) + getNormalizedBoundingBox().hashCode(); + } + if (hasTimeOffset()) { + hash = (37 * hash) + TIME_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getTimeOffset().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Video frame level annotations for object detection and tracking. This field
+   * stores per frame location, time offset, and confidence.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame) + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrameOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_ObjectTrackingFrame_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_ObjectTrackingFrame_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame.class, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame.Builder.class); + } + + // Construct using com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (normalizedBoundingBoxBuilder_ == null) { + normalizedBoundingBox_ = null; + } else { + normalizedBoundingBox_ = null; + normalizedBoundingBoxBuilder_ = null; + } + if (timeOffsetBuilder_ == null) { + timeOffset_ = null; + } else { + timeOffset_ = null; + timeOffsetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_ObjectTrackingFrame_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame + getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame build() { + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame result = + new com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame(this); + if (normalizedBoundingBoxBuilder_ == null) { + result.normalizedBoundingBox_ = normalizedBoundingBox_; + } else { + result.normalizedBoundingBox_ = normalizedBoundingBoxBuilder_.build(); + } + if (timeOffsetBuilder_ == null) { + result.timeOffset_ = timeOffset_; + } else { + result.timeOffset_ = timeOffsetBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame) { + return mergeFrom((com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame other) { + if (other + == com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame.getDefaultInstance()) + return this; + if (other.hasNormalizedBoundingBox()) { + mergeNormalizedBoundingBox(other.getNormalizedBoundingBox()); + } + if (other.hasTimeOffset()) { + mergeTimeOffset(other.getTimeOffset()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox + normalizedBoundingBox_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox, + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox.Builder, + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBoxOrBuilder> + normalizedBoundingBoxBuilder_; + /** + * + * + *
+     * The normalized bounding box location of this object track for the frame.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox normalized_bounding_box = 1; + * + */ + public boolean hasNormalizedBoundingBox() { + return normalizedBoundingBoxBuilder_ != null || normalizedBoundingBox_ != null; + } + /** + * + * + *
+     * The normalized bounding box location of this object track for the frame.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox normalized_bounding_box = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox + getNormalizedBoundingBox() { + if (normalizedBoundingBoxBuilder_ == null) { + return normalizedBoundingBox_ == null + ? com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox + .getDefaultInstance() + : normalizedBoundingBox_; + } else { + return normalizedBoundingBoxBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The normalized bounding box location of this object track for the frame.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox normalized_bounding_box = 1; + * + */ + public Builder setNormalizedBoundingBox( + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox value) { + if (normalizedBoundingBoxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + normalizedBoundingBox_ = value; + onChanged(); + } else { + normalizedBoundingBoxBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The normalized bounding box location of this object track for the frame.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox normalized_bounding_box = 1; + * + */ + public Builder setNormalizedBoundingBox( + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox.Builder + builderForValue) { + if (normalizedBoundingBoxBuilder_ == null) { + normalizedBoundingBox_ = builderForValue.build(); + onChanged(); + } else { + normalizedBoundingBoxBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The normalized bounding box location of this object track for the frame.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox normalized_bounding_box = 1; + * + */ + public Builder mergeNormalizedBoundingBox( + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox value) { + if (normalizedBoundingBoxBuilder_ == null) { + if (normalizedBoundingBox_ != null) { + normalizedBoundingBox_ = + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox.newBuilder( + normalizedBoundingBox_) + .mergeFrom(value) + .buildPartial(); + } else { + normalizedBoundingBox_ = value; + } + onChanged(); + } else { + normalizedBoundingBoxBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The normalized bounding box location of this object track for the frame.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox normalized_bounding_box = 1; + * + */ + public Builder clearNormalizedBoundingBox() { + if (normalizedBoundingBoxBuilder_ == null) { + normalizedBoundingBox_ = null; + onChanged(); + } else { + normalizedBoundingBox_ = null; + normalizedBoundingBoxBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The normalized bounding box location of this object track for the frame.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox normalized_bounding_box = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox.Builder + getNormalizedBoundingBoxBuilder() { + + onChanged(); + return getNormalizedBoundingBoxFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The normalized bounding box location of this object track for the frame.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox normalized_bounding_box = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBoxOrBuilder + getNormalizedBoundingBoxOrBuilder() { + if (normalizedBoundingBoxBuilder_ != null) { + return normalizedBoundingBoxBuilder_.getMessageOrBuilder(); + } else { + return normalizedBoundingBox_ == null + ? com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox + .getDefaultInstance() + : normalizedBoundingBox_; + } + } + /** + * + * + *
+     * The normalized bounding box location of this object track for the frame.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox normalized_bounding_box = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox, + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox.Builder, + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBoxOrBuilder> + getNormalizedBoundingBoxFieldBuilder() { + if (normalizedBoundingBoxBuilder_ == null) { + normalizedBoundingBoxBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox, + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox.Builder, + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBoxOrBuilder>( + getNormalizedBoundingBox(), getParentForChildren(), isClean()); + normalizedBoundingBox_ = null; + } + return normalizedBoundingBoxBuilder_; + } + + private com.google.protobuf.Duration timeOffset_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + timeOffsetBuilder_; + /** + * + * + *
+     * The timestamp of the frame in microseconds.
+     * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public boolean hasTimeOffset() { + return timeOffsetBuilder_ != null || timeOffset_ != null; + } + /** + * + * + *
+     * The timestamp of the frame in microseconds.
+     * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public com.google.protobuf.Duration getTimeOffset() { + if (timeOffsetBuilder_ == null) { + return timeOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeOffset_; + } else { + return timeOffsetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The timestamp of the frame in microseconds.
+     * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public Builder setTimeOffset(com.google.protobuf.Duration value) { + if (timeOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeOffset_ = value; + onChanged(); + } else { + timeOffsetBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The timestamp of the frame in microseconds.
+     * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public Builder setTimeOffset(com.google.protobuf.Duration.Builder builderForValue) { + if (timeOffsetBuilder_ == null) { + timeOffset_ = builderForValue.build(); + onChanged(); + } else { + timeOffsetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The timestamp of the frame in microseconds.
+     * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public Builder mergeTimeOffset(com.google.protobuf.Duration value) { + if (timeOffsetBuilder_ == null) { + if (timeOffset_ != null) { + timeOffset_ = + com.google.protobuf.Duration.newBuilder(timeOffset_).mergeFrom(value).buildPartial(); + } else { + timeOffset_ = value; + } + onChanged(); + } else { + timeOffsetBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The timestamp of the frame in microseconds.
+     * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public Builder clearTimeOffset() { + if (timeOffsetBuilder_ == null) { + timeOffset_ = null; + onChanged(); + } else { + timeOffset_ = null; + timeOffsetBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The timestamp of the frame in microseconds.
+     * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public com.google.protobuf.Duration.Builder getTimeOffsetBuilder() { + + onChanged(); + return getTimeOffsetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The timestamp of the frame in microseconds.
+     * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public com.google.protobuf.DurationOrBuilder getTimeOffsetOrBuilder() { + if (timeOffsetBuilder_ != null) { + return timeOffsetBuilder_.getMessageOrBuilder(); + } else { + return timeOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeOffset_; + } + } + /** + * + * + *
+     * The timestamp of the frame in microseconds.
+     * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTimeOffsetFieldBuilder() { + if (timeOffsetBuilder_ == null) { + timeOffsetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTimeOffset(), getParentForChildren(), isClean()); + timeOffset_ = null; + } + return timeOffsetBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame) + private static final com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ObjectTrackingFrame parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ObjectTrackingFrame(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ObjectTrackingFrameOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ObjectTrackingFrameOrBuilder.java new file mode 100644 index 000000000000..a2841a7af86a --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ObjectTrackingFrameOrBuilder.java @@ -0,0 +1,79 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface ObjectTrackingFrameOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The normalized bounding box location of this object track for the frame.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox normalized_bounding_box = 1; + * + */ + boolean hasNormalizedBoundingBox(); + /** + * + * + *
+   * The normalized bounding box location of this object track for the frame.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox normalized_bounding_box = 1; + * + */ + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox getNormalizedBoundingBox(); + /** + * + * + *
+   * The normalized bounding box location of this object track for the frame.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox normalized_bounding_box = 1; + * + */ + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBoxOrBuilder + getNormalizedBoundingBoxOrBuilder(); + + /** + * + * + *
+   * The timestamp of the frame in microseconds.
+   * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + boolean hasTimeOffset(); + /** + * + * + *
+   * The timestamp of the frame in microseconds.
+   * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + com.google.protobuf.Duration getTimeOffset(); + /** + * + * + *
+   * The timestamp of the frame in microseconds.
+   * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + com.google.protobuf.DurationOrBuilder getTimeOffsetOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ShotChangeDetectionConfig.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ShotChangeDetectionConfig.java new file mode 100644 index 000000000000..f1181ed136dc --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ShotChangeDetectionConfig.java @@ -0,0 +1,626 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Config for SHOT_CHANGE_DETECTION.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig} + */ +public final class ShotChangeDetectionConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig) + ShotChangeDetectionConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ShotChangeDetectionConfig.newBuilder() to construct. + private ShotChangeDetectionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ShotChangeDetectionConfig() { + model_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ShotChangeDetectionConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + model_ = s; + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_ShotChangeDetectionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_ShotChangeDetectionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig.class, + com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig.Builder.class); + } + + public static final int MODEL_FIELD_NUMBER = 1; + private volatile java.lang.Object model_; + /** + * + * + *
+   * Model to use for shot change detection.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest".
+   * 
+ * + * string model = 1; + */ + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } + } + /** + * + * + *
+   * Model to use for shot change detection.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest".
+   * 
+ * + * string model = 1; + */ + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getModelBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, model_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getModelBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, model_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig other = + (com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig) obj; + + boolean result = true; + result = result && getModel().equals(other.getModel()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Config for SHOT_CHANGE_DETECTION.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig) + com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_ShotChangeDetectionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_ShotChangeDetectionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig.class, + com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig.Builder.class); + } + + // Construct using + // com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + model_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_ShotChangeDetectionConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig + getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig build() { + com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig result = + new com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig(this); + result.model_ = model_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig) { + return mergeFrom( + (com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig other) { + if (other + == com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig + .getDefaultInstance()) return this; + if (!other.getModel().isEmpty()) { + model_ = other.model_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object model_ = ""; + /** + * + * + *
+     * Model to use for shot change detection.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest".
+     * 
+ * + * string model = 1; + */ + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Model to use for shot change detection.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest".
+     * 
+ * + * string model = 1; + */ + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Model to use for shot change detection.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest".
+     * 
+ * + * string model = 1; + */ + public Builder setModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + model_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Model to use for shot change detection.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest".
+     * 
+ * + * string model = 1; + */ + public Builder clearModel() { + + model_ = getDefaultInstance().getModel(); + onChanged(); + return this; + } + /** + * + * + *
+     * Model to use for shot change detection.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest".
+     * 
+ * + * string model = 1; + */ + public Builder setModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + model_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig) + private static final com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ShotChangeDetectionConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ShotChangeDetectionConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ShotChangeDetectionConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ShotChangeDetectionConfigOrBuilder.java new file mode 100644 index 000000000000..f7a74b83d421 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/ShotChangeDetectionConfigOrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface ShotChangeDetectionConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Model to use for shot change detection.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest".
+   * 
+ * + * string model = 1; + */ + java.lang.String getModel(); + /** + * + * + *
+   * Model to use for shot change detection.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest".
+   * 
+ * + * string model = 1; + */ + com.google.protobuf.ByteString getModelBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingAnnotateVideoRequest.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingAnnotateVideoRequest.java new file mode 100644 index 000000000000..800c6b5d47cf --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingAnnotateVideoRequest.java @@ -0,0 +1,993 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * The top-level message sent by the client for the `StreamingAnnotateVideo`
+ * method. Multiple `StreamingAnnotateVideoRequest` messages are sent.
+ * The first message must only contain a `StreamingVideoConfig` message.
+ * All subsequent messages must only contain `input_content` data.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest} + */ +public final class StreamingAnnotateVideoRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest) + StreamingAnnotateVideoRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StreamingAnnotateVideoRequest.newBuilder() to construct. + private StreamingAnnotateVideoRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StreamingAnnotateVideoRequest() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StreamingAnnotateVideoRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig.Builder subBuilder = + null; + if (streamingRequestCase_ == 1) { + subBuilder = + ((com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig) + streamingRequest_) + .toBuilder(); + } + streamingRequest_ = + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig) + streamingRequest_); + streamingRequest_ = subBuilder.buildPartial(); + } + streamingRequestCase_ = 1; + break; + } + case 18: + { + streamingRequestCase_ = 2; + streamingRequest_ = input.readBytes(); + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingAnnotateVideoRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingAnnotateVideoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest.class, + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest.Builder + .class); + } + + private int streamingRequestCase_ = 0; + private java.lang.Object streamingRequest_; + + public enum StreamingRequestCase implements com.google.protobuf.Internal.EnumLite { + VIDEO_CONFIG(1), + INPUT_CONTENT(2), + STREAMINGREQUEST_NOT_SET(0); + private final int value; + + private StreamingRequestCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static StreamingRequestCase valueOf(int value) { + return forNumber(value); + } + + public static StreamingRequestCase forNumber(int value) { + switch (value) { + case 1: + return VIDEO_CONFIG; + case 2: + return INPUT_CONTENT; + case 0: + return STREAMINGREQUEST_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public StreamingRequestCase getStreamingRequestCase() { + return StreamingRequestCase.forNumber(streamingRequestCase_); + } + + public static final int VIDEO_CONFIG_FIELD_NUMBER = 1; + /** + * + * + *
+   * Provides information to the annotator, specifing how to process the
+   * request. The first `AnnotateStreamingVideoRequest` message must only
+   * contain a `video_config` message.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig video_config = 1; + */ + public boolean hasVideoConfig() { + return streamingRequestCase_ == 1; + } + /** + * + * + *
+   * Provides information to the annotator, specifing how to process the
+   * request. The first `AnnotateStreamingVideoRequest` message must only
+   * contain a `video_config` message.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig video_config = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig getVideoConfig() { + if (streamingRequestCase_ == 1) { + return (com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig) streamingRequest_; + } + return com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Provides information to the annotator, specifing how to process the
+   * request. The first `AnnotateStreamingVideoRequest` message must only
+   * contain a `video_config` message.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig video_config = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfigOrBuilder + getVideoConfigOrBuilder() { + if (streamingRequestCase_ == 1) { + return (com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig) streamingRequest_; + } + return com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig.getDefaultInstance(); + } + + public static final int INPUT_CONTENT_FIELD_NUMBER = 2; + /** + * + * + *
+   * The video data to be annotated. Chunks of video data are sequentially
+   * sent in `StreamingAnnotateVideoRequest` messages. Except the initial
+   * `StreamingAnnotateVideoRequest` message containing only
+   * `video_config`, all subsequent `AnnotateStreamingVideoRequest`
+   * messages must only contain `input_content` field.
+   * 
+ * + * bytes input_content = 2; + */ + public com.google.protobuf.ByteString getInputContent() { + if (streamingRequestCase_ == 2) { + return (com.google.protobuf.ByteString) streamingRequest_; + } + return com.google.protobuf.ByteString.EMPTY; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (streamingRequestCase_ == 1) { + output.writeMessage( + 1, (com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig) streamingRequest_); + } + if (streamingRequestCase_ == 2) { + output.writeBytes(2, (com.google.protobuf.ByteString) streamingRequest_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (streamingRequestCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig) + streamingRequest_); + } + if (streamingRequestCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeBytesSize( + 2, (com.google.protobuf.ByteString) streamingRequest_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest other = + (com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest) obj; + + boolean result = true; + result = result && getStreamingRequestCase().equals(other.getStreamingRequestCase()); + if (!result) return false; + switch (streamingRequestCase_) { + case 1: + result = result && getVideoConfig().equals(other.getVideoConfig()); + break; + case 2: + result = result && getInputContent().equals(other.getInputContent()); + break; + case 0: + default: + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (streamingRequestCase_) { + case 1: + hash = (37 * hash) + VIDEO_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getVideoConfig().hashCode(); + break; + case 2: + hash = (37 * hash) + INPUT_CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getInputContent().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The top-level message sent by the client for the `StreamingAnnotateVideo`
+   * method. Multiple `StreamingAnnotateVideoRequest` messages are sent.
+   * The first message must only contain a `StreamingVideoConfig` message.
+   * All subsequent messages must only contain `input_content` data.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest) + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingAnnotateVideoRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingAnnotateVideoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest.class, + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + streamingRequestCase_ = 0; + streamingRequest_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingAnnotateVideoRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest + getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest build() { + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest + buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest result = + new com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest(this); + if (streamingRequestCase_ == 1) { + if (videoConfigBuilder_ == null) { + result.streamingRequest_ = streamingRequest_; + } else { + result.streamingRequest_ = videoConfigBuilder_.build(); + } + } + if (streamingRequestCase_ == 2) { + result.streamingRequest_ = streamingRequest_; + } + result.streamingRequestCase_ = streamingRequestCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest) { + return mergeFrom( + (com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest other) { + if (other + == com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest + .getDefaultInstance()) return this; + switch (other.getStreamingRequestCase()) { + case VIDEO_CONFIG: + { + mergeVideoConfig(other.getVideoConfig()); + break; + } + case INPUT_CONTENT: + { + setInputContent(other.getInputContent()); + break; + } + case STREAMINGREQUEST_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int streamingRequestCase_ = 0; + private java.lang.Object streamingRequest_; + + public StreamingRequestCase getStreamingRequestCase() { + return StreamingRequestCase.forNumber(streamingRequestCase_); + } + + public Builder clearStreamingRequest() { + streamingRequestCase_ = 0; + streamingRequest_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig, + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig.Builder, + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfigOrBuilder> + videoConfigBuilder_; + /** + * + * + *
+     * Provides information to the annotator, specifing how to process the
+     * request. The first `AnnotateStreamingVideoRequest` message must only
+     * contain a `video_config` message.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig video_config = 1; + */ + public boolean hasVideoConfig() { + return streamingRequestCase_ == 1; + } + /** + * + * + *
+     * Provides information to the annotator, specifing how to process the
+     * request. The first `AnnotateStreamingVideoRequest` message must only
+     * contain a `video_config` message.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig video_config = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig getVideoConfig() { + if (videoConfigBuilder_ == null) { + if (streamingRequestCase_ == 1) { + return (com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig) + streamingRequest_; + } + return com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig + .getDefaultInstance(); + } else { + if (streamingRequestCase_ == 1) { + return videoConfigBuilder_.getMessage(); + } + return com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Provides information to the annotator, specifing how to process the
+     * request. The first `AnnotateStreamingVideoRequest` message must only
+     * contain a `video_config` message.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig video_config = 1; + */ + public Builder setVideoConfig( + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig value) { + if (videoConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + streamingRequest_ = value; + onChanged(); + } else { + videoConfigBuilder_.setMessage(value); + } + streamingRequestCase_ = 1; + return this; + } + /** + * + * + *
+     * Provides information to the annotator, specifing how to process the
+     * request. The first `AnnotateStreamingVideoRequest` message must only
+     * contain a `video_config` message.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig video_config = 1; + */ + public Builder setVideoConfig( + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig.Builder builderForValue) { + if (videoConfigBuilder_ == null) { + streamingRequest_ = builderForValue.build(); + onChanged(); + } else { + videoConfigBuilder_.setMessage(builderForValue.build()); + } + streamingRequestCase_ = 1; + return this; + } + /** + * + * + *
+     * Provides information to the annotator, specifing how to process the
+     * request. The first `AnnotateStreamingVideoRequest` message must only
+     * contain a `video_config` message.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig video_config = 1; + */ + public Builder mergeVideoConfig( + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig value) { + if (videoConfigBuilder_ == null) { + if (streamingRequestCase_ == 1 + && streamingRequest_ + != com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig + .getDefaultInstance()) { + streamingRequest_ = + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig.newBuilder( + (com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig) + streamingRequest_) + .mergeFrom(value) + .buildPartial(); + } else { + streamingRequest_ = value; + } + onChanged(); + } else { + if (streamingRequestCase_ == 1) { + videoConfigBuilder_.mergeFrom(value); + } + videoConfigBuilder_.setMessage(value); + } + streamingRequestCase_ = 1; + return this; + } + /** + * + * + *
+     * Provides information to the annotator, specifing how to process the
+     * request. The first `AnnotateStreamingVideoRequest` message must only
+     * contain a `video_config` message.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig video_config = 1; + */ + public Builder clearVideoConfig() { + if (videoConfigBuilder_ == null) { + if (streamingRequestCase_ == 1) { + streamingRequestCase_ = 0; + streamingRequest_ = null; + onChanged(); + } + } else { + if (streamingRequestCase_ == 1) { + streamingRequestCase_ = 0; + streamingRequest_ = null; + } + videoConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Provides information to the annotator, specifing how to process the
+     * request. The first `AnnotateStreamingVideoRequest` message must only
+     * contain a `video_config` message.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig video_config = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig.Builder + getVideoConfigBuilder() { + return getVideoConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Provides information to the annotator, specifing how to process the
+     * request. The first `AnnotateStreamingVideoRequest` message must only
+     * contain a `video_config` message.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig video_config = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfigOrBuilder + getVideoConfigOrBuilder() { + if ((streamingRequestCase_ == 1) && (videoConfigBuilder_ != null)) { + return videoConfigBuilder_.getMessageOrBuilder(); + } else { + if (streamingRequestCase_ == 1) { + return (com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig) + streamingRequest_; + } + return com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Provides information to the annotator, specifing how to process the
+     * request. The first `AnnotateStreamingVideoRequest` message must only
+     * contain a `video_config` message.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig video_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig, + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig.Builder, + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfigOrBuilder> + getVideoConfigFieldBuilder() { + if (videoConfigBuilder_ == null) { + if (!(streamingRequestCase_ == 1)) { + streamingRequest_ = + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig + .getDefaultInstance(); + } + videoConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig, + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig.Builder, + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfigOrBuilder>( + (com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig) + streamingRequest_, + getParentForChildren(), + isClean()); + streamingRequest_ = null; + } + streamingRequestCase_ = 1; + onChanged(); + ; + return videoConfigBuilder_; + } + + /** + * + * + *
+     * The video data to be annotated. Chunks of video data are sequentially
+     * sent in `StreamingAnnotateVideoRequest` messages. Except the initial
+     * `StreamingAnnotateVideoRequest` message containing only
+     * `video_config`, all subsequent `AnnotateStreamingVideoRequest`
+     * messages must only contain `input_content` field.
+     * 
+ * + * bytes input_content = 2; + */ + public com.google.protobuf.ByteString getInputContent() { + if (streamingRequestCase_ == 2) { + return (com.google.protobuf.ByteString) streamingRequest_; + } + return com.google.protobuf.ByteString.EMPTY; + } + /** + * + * + *
+     * The video data to be annotated. Chunks of video data are sequentially
+     * sent in `StreamingAnnotateVideoRequest` messages. Except the initial
+     * `StreamingAnnotateVideoRequest` message containing only
+     * `video_config`, all subsequent `AnnotateStreamingVideoRequest`
+     * messages must only contain `input_content` field.
+     * 
+ * + * bytes input_content = 2; + */ + public Builder setInputContent(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + streamingRequestCase_ = 2; + streamingRequest_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The video data to be annotated. Chunks of video data are sequentially
+     * sent in `StreamingAnnotateVideoRequest` messages. Except the initial
+     * `StreamingAnnotateVideoRequest` message containing only
+     * `video_config`, all subsequent `AnnotateStreamingVideoRequest`
+     * messages must only contain `input_content` field.
+     * 
+ * + * bytes input_content = 2; + */ + public Builder clearInputContent() { + if (streamingRequestCase_ == 2) { + streamingRequestCase_ = 0; + streamingRequest_ = null; + onChanged(); + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest) + private static final com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StreamingAnnotateVideoRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StreamingAnnotateVideoRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingAnnotateVideoRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingAnnotateVideoRequestOrBuilder.java new file mode 100644 index 000000000000..8bc749593981 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingAnnotateVideoRequestOrBuilder.java @@ -0,0 +1,67 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface StreamingAnnotateVideoRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Provides information to the annotator, specifing how to process the
+   * request. The first `AnnotateStreamingVideoRequest` message must only
+   * contain a `video_config` message.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig video_config = 1; + */ + boolean hasVideoConfig(); + /** + * + * + *
+   * Provides information to the annotator, specifing how to process the
+   * request. The first `AnnotateStreamingVideoRequest` message must only
+   * contain a `video_config` message.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig video_config = 1; + */ + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig getVideoConfig(); + /** + * + * + *
+   * Provides information to the annotator, specifing how to process the
+   * request. The first `AnnotateStreamingVideoRequest` message must only
+   * contain a `video_config` message.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig video_config = 1; + */ + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfigOrBuilder + getVideoConfigOrBuilder(); + + /** + * + * + *
+   * The video data to be annotated. Chunks of video data are sequentially
+   * sent in `StreamingAnnotateVideoRequest` messages. Except the initial
+   * `StreamingAnnotateVideoRequest` message containing only
+   * `video_config`, all subsequent `AnnotateStreamingVideoRequest`
+   * messages must only contain `input_content` field.
+   * 
+ * + * bytes input_content = 2; + */ + com.google.protobuf.ByteString getInputContent(); + + public com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest + .StreamingRequestCase + getStreamingRequestCase(); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingAnnotateVideoResponse.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingAnnotateVideoResponse.java new file mode 100644 index 000000000000..729773262d45 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingAnnotateVideoResponse.java @@ -0,0 +1,1222 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * `StreamingAnnotateVideoResponse` is the only message returned to the client
+ * by `StreamingAnnotateVideo`. A series of zero or more
+ * `StreamingAnnotateVideoResponse` messages are streamed back to the client.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse} + */ +public final class StreamingAnnotateVideoResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse) + StreamingAnnotateVideoResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use StreamingAnnotateVideoResponse.newBuilder() to construct. + private StreamingAnnotateVideoResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StreamingAnnotateVideoResponse() { + annotationResultsUri_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StreamingAnnotateVideoResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.rpc.Status.Builder subBuilder = null; + if (error_ != null) { + subBuilder = error_.toBuilder(); + } + error_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(error_); + error_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults.Builder + subBuilder = null; + if (annotationResults_ != null) { + subBuilder = annotationResults_.toBuilder(); + } + annotationResults_ = + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(annotationResults_); + annotationResults_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + annotationResultsUri_ = s; + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingAnnotateVideoResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingAnnotateVideoResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse.class, + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse.Builder + .class); + } + + public static final int ERROR_FIELD_NUMBER = 1; + private com.google.rpc.Status error_; + /** + * + * + *
+   * If set, returns a [google.rpc.Status][] message that
+   * specifies the error for the operation.
+   * 
+ * + * .google.rpc.Status error = 1; + */ + public boolean hasError() { + return error_ != null; + } + /** + * + * + *
+   * If set, returns a [google.rpc.Status][] message that
+   * specifies the error for the operation.
+   * 
+ * + * .google.rpc.Status error = 1; + */ + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + /** + * + * + *
+   * If set, returns a [google.rpc.Status][] message that
+   * specifies the error for the operation.
+   * 
+ * + * .google.rpc.Status error = 1; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return getError(); + } + + public static final int ANNOTATION_RESULTS_FIELD_NUMBER = 2; + private com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults + annotationResults_; + /** + * + * + *
+   * Streaming annotation results.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults annotation_results = 2; + * + */ + public boolean hasAnnotationResults() { + return annotationResults_ != null; + } + /** + * + * + *
+   * Streaming annotation results.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults annotation_results = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults + getAnnotationResults() { + return annotationResults_ == null + ? com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults + .getDefaultInstance() + : annotationResults_; + } + /** + * + * + *
+   * Streaming annotation results.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults annotation_results = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResultsOrBuilder + getAnnotationResultsOrBuilder() { + return getAnnotationResults(); + } + + public static final int ANNOTATION_RESULTS_URI_FIELD_NUMBER = 3; + private volatile java.lang.Object annotationResultsUri_; + /** + * + * + *
+   * GCS URI that stores annotation results of one streaming session.
+   * It is a directory that can hold multiple files in JSON format.
+   * Example uri format:
+   * gs://bucket_id/object_id/cloud_project_name-session_id
+   * 
+ * + * string annotation_results_uri = 3; + */ + public java.lang.String getAnnotationResultsUri() { + java.lang.Object ref = annotationResultsUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotationResultsUri_ = s; + return s; + } + } + /** + * + * + *
+   * GCS URI that stores annotation results of one streaming session.
+   * It is a directory that can hold multiple files in JSON format.
+   * Example uri format:
+   * gs://bucket_id/object_id/cloud_project_name-session_id
+   * 
+ * + * string annotation_results_uri = 3; + */ + public com.google.protobuf.ByteString getAnnotationResultsUriBytes() { + java.lang.Object ref = annotationResultsUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationResultsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (error_ != null) { + output.writeMessage(1, getError()); + } + if (annotationResults_ != null) { + output.writeMessage(2, getAnnotationResults()); + } + if (!getAnnotationResultsUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, annotationResultsUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (error_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getError()); + } + if (annotationResults_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAnnotationResults()); + } + if (!getAnnotationResultsUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, annotationResultsUri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse other = + (com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse) obj; + + boolean result = true; + result = result && (hasError() == other.hasError()); + if (hasError()) { + result = result && getError().equals(other.getError()); + } + result = result && (hasAnnotationResults() == other.hasAnnotationResults()); + if (hasAnnotationResults()) { + result = result && getAnnotationResults().equals(other.getAnnotationResults()); + } + result = result && getAnnotationResultsUri().equals(other.getAnnotationResultsUri()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + if (hasAnnotationResults()) { + hash = (37 * hash) + ANNOTATION_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationResults().hashCode(); + } + hash = (37 * hash) + ANNOTATION_RESULTS_URI_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationResultsUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * `StreamingAnnotateVideoResponse` is the only message returned to the client
+   * by `StreamingAnnotateVideo`. A series of zero or more
+   * `StreamingAnnotateVideoResponse` messages are streamed back to the client.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse) + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingAnnotateVideoResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingAnnotateVideoResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse.class, + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (errorBuilder_ == null) { + error_ = null; + } else { + error_ = null; + errorBuilder_ = null; + } + if (annotationResultsBuilder_ == null) { + annotationResults_ = null; + } else { + annotationResults_ = null; + annotationResultsBuilder_ = null; + } + annotationResultsUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingAnnotateVideoResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse + getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse build() { + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse + buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse result = + new com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse(this); + if (errorBuilder_ == null) { + result.error_ = error_; + } else { + result.error_ = errorBuilder_.build(); + } + if (annotationResultsBuilder_ == null) { + result.annotationResults_ = annotationResults_; + } else { + result.annotationResults_ = annotationResultsBuilder_.build(); + } + result.annotationResultsUri_ = annotationResultsUri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse) { + return mergeFrom( + (com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse other) { + if (other + == com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse + .getDefaultInstance()) return this; + if (other.hasError()) { + mergeError(other.getError()); + } + if (other.hasAnnotationResults()) { + mergeAnnotationResults(other.getAnnotationResults()); + } + if (!other.getAnnotationResultsUri().isEmpty()) { + annotationResultsUri_ = other.annotationResultsUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.rpc.Status error_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorBuilder_; + /** + * + * + *
+     * If set, returns a [google.rpc.Status][] message that
+     * specifies the error for the operation.
+     * 
+ * + * .google.rpc.Status error = 1; + */ + public boolean hasError() { + return errorBuilder_ != null || error_ != null; + } + /** + * + * + *
+     * If set, returns a [google.rpc.Status][] message that
+     * specifies the error for the operation.
+     * 
+ * + * .google.rpc.Status error = 1; + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * If set, returns a [google.rpc.Status][] message that
+     * specifies the error for the operation.
+     * 
+ * + * .google.rpc.Status error = 1; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * If set, returns a [google.rpc.Status][] message that
+     * specifies the error for the operation.
+     * 
+ * + * .google.rpc.Status error = 1; + */ + public Builder setError(com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * If set, returns a [google.rpc.Status][] message that
+     * specifies the error for the operation.
+     * 
+ * + * .google.rpc.Status error = 1; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (error_ != null) { + error_ = com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial(); + } else { + error_ = value; + } + onChanged(); + } else { + errorBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * If set, returns a [google.rpc.Status][] message that
+     * specifies the error for the operation.
+     * 
+ * + * .google.rpc.Status error = 1; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + error_ = null; + onChanged(); + } else { + error_ = null; + errorBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * If set, returns a [google.rpc.Status][] message that
+     * specifies the error for the operation.
+     * 
+ * + * .google.rpc.Status error = 1; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * If set, returns a [google.rpc.Status][] message that
+     * specifies the error for the operation.
+     * 
+ * + * .google.rpc.Status error = 1; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + } + /** + * + * + *
+     * If set, returns a [google.rpc.Status][] message that
+     * specifies the error for the operation.
+     * 
+ * + * .google.rpc.Status error = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getError(), getParentForChildren(), isClean()); + error_ = null; + } + return errorBuilder_; + } + + private com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults + annotationResults_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults, + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults.Builder, + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResultsOrBuilder> + annotationResultsBuilder_; + /** + * + * + *
+     * Streaming annotation results.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults annotation_results = 2; + * + */ + public boolean hasAnnotationResults() { + return annotationResultsBuilder_ != null || annotationResults_ != null; + } + /** + * + * + *
+     * Streaming annotation results.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults annotation_results = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults + getAnnotationResults() { + if (annotationResultsBuilder_ == null) { + return annotationResults_ == null + ? com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults + .getDefaultInstance() + : annotationResults_; + } else { + return annotationResultsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Streaming annotation results.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults annotation_results = 2; + * + */ + public Builder setAnnotationResults( + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults value) { + if (annotationResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotationResults_ = value; + onChanged(); + } else { + annotationResultsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Streaming annotation results.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults annotation_results = 2; + * + */ + public Builder setAnnotationResults( + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults.Builder + builderForValue) { + if (annotationResultsBuilder_ == null) { + annotationResults_ = builderForValue.build(); + onChanged(); + } else { + annotationResultsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Streaming annotation results.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults annotation_results = 2; + * + */ + public Builder mergeAnnotationResults( + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults value) { + if (annotationResultsBuilder_ == null) { + if (annotationResults_ != null) { + annotationResults_ = + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults + .newBuilder(annotationResults_) + .mergeFrom(value) + .buildPartial(); + } else { + annotationResults_ = value; + } + onChanged(); + } else { + annotationResultsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Streaming annotation results.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults annotation_results = 2; + * + */ + public Builder clearAnnotationResults() { + if (annotationResultsBuilder_ == null) { + annotationResults_ = null; + onChanged(); + } else { + annotationResults_ = null; + annotationResultsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Streaming annotation results.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults annotation_results = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults.Builder + getAnnotationResultsBuilder() { + + onChanged(); + return getAnnotationResultsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Streaming annotation results.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults annotation_results = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResultsOrBuilder + getAnnotationResultsOrBuilder() { + if (annotationResultsBuilder_ != null) { + return annotationResultsBuilder_.getMessageOrBuilder(); + } else { + return annotationResults_ == null + ? com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults + .getDefaultInstance() + : annotationResults_; + } + } + /** + * + * + *
+     * Streaming annotation results.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults annotation_results = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults, + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults.Builder, + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResultsOrBuilder> + getAnnotationResultsFieldBuilder() { + if (annotationResultsBuilder_ == null) { + annotationResultsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults, + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults + .Builder, + com.google.cloud.videointelligence.v1p3beta1 + .StreamingVideoAnnotationResultsOrBuilder>( + getAnnotationResults(), getParentForChildren(), isClean()); + annotationResults_ = null; + } + return annotationResultsBuilder_; + } + + private java.lang.Object annotationResultsUri_ = ""; + /** + * + * + *
+     * GCS URI that stores annotation results of one streaming session.
+     * It is a directory that can hold multiple files in JSON format.
+     * Example uri format:
+     * gs://bucket_id/object_id/cloud_project_name-session_id
+     * 
+ * + * string annotation_results_uri = 3; + */ + public java.lang.String getAnnotationResultsUri() { + java.lang.Object ref = annotationResultsUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotationResultsUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * GCS URI that stores annotation results of one streaming session.
+     * It is a directory that can hold multiple files in JSON format.
+     * Example uri format:
+     * gs://bucket_id/object_id/cloud_project_name-session_id
+     * 
+ * + * string annotation_results_uri = 3; + */ + public com.google.protobuf.ByteString getAnnotationResultsUriBytes() { + java.lang.Object ref = annotationResultsUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationResultsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * GCS URI that stores annotation results of one streaming session.
+     * It is a directory that can hold multiple files in JSON format.
+     * Example uri format:
+     * gs://bucket_id/object_id/cloud_project_name-session_id
+     * 
+ * + * string annotation_results_uri = 3; + */ + public Builder setAnnotationResultsUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + annotationResultsUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * GCS URI that stores annotation results of one streaming session.
+     * It is a directory that can hold multiple files in JSON format.
+     * Example uri format:
+     * gs://bucket_id/object_id/cloud_project_name-session_id
+     * 
+ * + * string annotation_results_uri = 3; + */ + public Builder clearAnnotationResultsUri() { + + annotationResultsUri_ = getDefaultInstance().getAnnotationResultsUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * GCS URI that stores annotation results of one streaming session.
+     * It is a directory that can hold multiple files in JSON format.
+     * Example uri format:
+     * gs://bucket_id/object_id/cloud_project_name-session_id
+     * 
+ * + * string annotation_results_uri = 3; + */ + public Builder setAnnotationResultsUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + annotationResultsUri_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse) + private static final com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StreamingAnnotateVideoResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StreamingAnnotateVideoResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingAnnotateVideoResponseOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingAnnotateVideoResponseOrBuilder.java new file mode 100644 index 000000000000..84664791114b --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingAnnotateVideoResponseOrBuilder.java @@ -0,0 +1,110 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface StreamingAnnotateVideoResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * If set, returns a [google.rpc.Status][] message that
+   * specifies the error for the operation.
+   * 
+ * + * .google.rpc.Status error = 1; + */ + boolean hasError(); + /** + * + * + *
+   * If set, returns a [google.rpc.Status][] message that
+   * specifies the error for the operation.
+   * 
+ * + * .google.rpc.Status error = 1; + */ + com.google.rpc.Status getError(); + /** + * + * + *
+   * If set, returns a [google.rpc.Status][] message that
+   * specifies the error for the operation.
+   * 
+ * + * .google.rpc.Status error = 1; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + /** + * + * + *
+   * Streaming annotation results.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults annotation_results = 2; + * + */ + boolean hasAnnotationResults(); + /** + * + * + *
+   * Streaming annotation results.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults annotation_results = 2; + * + */ + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults + getAnnotationResults(); + /** + * + * + *
+   * Streaming annotation results.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults annotation_results = 2; + * + */ + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResultsOrBuilder + getAnnotationResultsOrBuilder(); + + /** + * + * + *
+   * GCS URI that stores annotation results of one streaming session.
+   * It is a directory that can hold multiple files in JSON format.
+   * Example uri format:
+   * gs://bucket_id/object_id/cloud_project_name-session_id
+   * 
+ * + * string annotation_results_uri = 3; + */ + java.lang.String getAnnotationResultsUri(); + /** + * + * + *
+   * GCS URI that stores annotation results of one streaming session.
+   * It is a directory that can hold multiple files in JSON format.
+   * Example uri format:
+   * gs://bucket_id/object_id/cloud_project_name-session_id
+   * 
+ * + * string annotation_results_uri = 3; + */ + com.google.protobuf.ByteString getAnnotationResultsUriBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingExplicitContentDetectionConfig.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingExplicitContentDetectionConfig.java new file mode 100644 index 000000000000..af2d93c9fc76 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingExplicitContentDetectionConfig.java @@ -0,0 +1,476 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Config for EXPLICIT_CONTENT_DETECTION in streaming mode.
+ * 
+ * + * Protobuf type {@code + * google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig} + */ +public final class StreamingExplicitContentDetectionConfig + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig) + StreamingExplicitContentDetectionConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use StreamingExplicitContentDetectionConfig.newBuilder() to construct. + private StreamingExplicitContentDetectionConfig( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StreamingExplicitContentDetectionConfig() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StreamingExplicitContentDetectionConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingExplicitContentDetectionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingExplicitContentDetectionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + .class, + com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + .Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig other = + (com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Config for EXPLICIT_CONTENT_DETECTION in streaming mode.
+   * 
+ * + * Protobuf type {@code + * google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig) + com.google.cloud.videointelligence.v1p3beta1 + .StreamingExplicitContentDetectionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingExplicitContentDetectionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingExplicitContentDetectionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + .class, + com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + .Builder.class); + } + + // Construct using + // com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingExplicitContentDetectionConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + build() { + com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig result = + new com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig( + this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig) { + return mergeFrom( + (com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + other) { + if (other + == com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + .getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig) + private static final com.google.cloud.videointelligence.v1p3beta1 + .StreamingExplicitContentDetectionConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StreamingExplicitContentDetectionConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StreamingExplicitContentDetectionConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingExplicitContentDetectionConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingExplicitContentDetectionConfigOrBuilder.java new file mode 100644 index 000000000000..8bf079e00399 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingExplicitContentDetectionConfigOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface StreamingExplicitContentDetectionConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig) + com.google.protobuf.MessageOrBuilder {} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingFeature.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingFeature.java new file mode 100644 index 000000000000..5b4390c71bd8 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingFeature.java @@ -0,0 +1,196 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Streaming video annotation feature.
+ * 
+ * + * Protobuf enum {@code google.cloud.videointelligence.v1p3beta1.StreamingFeature} + */ +public enum StreamingFeature implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified.
+   * 
+ * + * STREAMING_FEATURE_UNSPECIFIED = 0; + */ + STREAMING_FEATURE_UNSPECIFIED(0), + /** + * + * + *
+   * Label detection. Detect objects, such as dog or flower.
+   * 
+ * + * STREAMING_LABEL_DETECTION = 1; + */ + STREAMING_LABEL_DETECTION(1), + /** + * + * + *
+   * Shot change detection.
+   * 
+ * + * STREAMING_SHOT_CHANGE_DETECTION = 2; + */ + STREAMING_SHOT_CHANGE_DETECTION(2), + /** + * + * + *
+   * Explicit content detection.
+   * 
+ * + * STREAMING_EXPLICIT_CONTENT_DETECTION = 3; + */ + STREAMING_EXPLICIT_CONTENT_DETECTION(3), + /** + * + * + *
+   * Object detection and tracking.
+   * 
+ * + * STREAMING_OBJECT_TRACKING = 4; + */ + STREAMING_OBJECT_TRACKING(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Unspecified.
+   * 
+ * + * STREAMING_FEATURE_UNSPECIFIED = 0; + */ + public static final int STREAMING_FEATURE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Label detection. Detect objects, such as dog or flower.
+   * 
+ * + * STREAMING_LABEL_DETECTION = 1; + */ + public static final int STREAMING_LABEL_DETECTION_VALUE = 1; + /** + * + * + *
+   * Shot change detection.
+   * 
+ * + * STREAMING_SHOT_CHANGE_DETECTION = 2; + */ + public static final int STREAMING_SHOT_CHANGE_DETECTION_VALUE = 2; + /** + * + * + *
+   * Explicit content detection.
+   * 
+ * + * STREAMING_EXPLICIT_CONTENT_DETECTION = 3; + */ + public static final int STREAMING_EXPLICIT_CONTENT_DETECTION_VALUE = 3; + /** + * + * + *
+   * Object detection and tracking.
+   * 
+ * + * STREAMING_OBJECT_TRACKING = 4; + */ + public static final int STREAMING_OBJECT_TRACKING_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static StreamingFeature valueOf(int value) { + return forNumber(value); + } + + public static StreamingFeature forNumber(int value) { + switch (value) { + case 0: + return STREAMING_FEATURE_UNSPECIFIED; + case 1: + return STREAMING_LABEL_DETECTION; + case 2: + return STREAMING_SHOT_CHANGE_DETECTION; + case 3: + return STREAMING_EXPLICIT_CONTENT_DETECTION; + case 4: + return STREAMING_OBJECT_TRACKING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public StreamingFeature findValueByNumber(int number) { + return StreamingFeature.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .getDescriptor() + .getEnumTypes() + .get(3); + } + + private static final StreamingFeature[] VALUES = values(); + + public static StreamingFeature valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private StreamingFeature(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.videointelligence.v1p3beta1.StreamingFeature) +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingLabelDetectionConfig.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingLabelDetectionConfig.java new file mode 100644 index 000000000000..4f6d70570350 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingLabelDetectionConfig.java @@ -0,0 +1,551 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Config for LABEL_DETECTION in streaming mode.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig} + */ +public final class StreamingLabelDetectionConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig) + StreamingLabelDetectionConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use StreamingLabelDetectionConfig.newBuilder() to construct. + private StreamingLabelDetectionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StreamingLabelDetectionConfig() { + stationaryCamera_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StreamingLabelDetectionConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + stationaryCamera_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingLabelDetectionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingLabelDetectionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig.class, + com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig.Builder + .class); + } + + public static final int STATIONARY_CAMERA_FIELD_NUMBER = 1; + private boolean stationaryCamera_; + /** + * + * + *
+   * Whether the video has been captured from a stationary (i.e. non-moving)
+   * camera. When set to true, might improve detection accuracy for moving
+   * objects. Default: false.
+   * 
+ * + * bool stationary_camera = 1; + */ + public boolean getStationaryCamera() { + return stationaryCamera_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (stationaryCamera_ != false) { + output.writeBool(1, stationaryCamera_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (stationaryCamera_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, stationaryCamera_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig other = + (com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig) obj; + + boolean result = true; + result = result && (getStationaryCamera() == other.getStationaryCamera()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STATIONARY_CAMERA_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getStationaryCamera()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Config for LABEL_DETECTION in streaming mode.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig) + com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingLabelDetectionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingLabelDetectionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig.class, + com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + stationaryCamera_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingLabelDetectionConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig + getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig build() { + com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig + buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig result = + new com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig(this); + result.stationaryCamera_ = stationaryCamera_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig) { + return mergeFrom( + (com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig other) { + if (other + == com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig + .getDefaultInstance()) return this; + if (other.getStationaryCamera() != false) { + setStationaryCamera(other.getStationaryCamera()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean stationaryCamera_; + /** + * + * + *
+     * Whether the video has been captured from a stationary (i.e. non-moving)
+     * camera. When set to true, might improve detection accuracy for moving
+     * objects. Default: false.
+     * 
+ * + * bool stationary_camera = 1; + */ + public boolean getStationaryCamera() { + return stationaryCamera_; + } + /** + * + * + *
+     * Whether the video has been captured from a stationary (i.e. non-moving)
+     * camera. When set to true, might improve detection accuracy for moving
+     * objects. Default: false.
+     * 
+ * + * bool stationary_camera = 1; + */ + public Builder setStationaryCamera(boolean value) { + + stationaryCamera_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether the video has been captured from a stationary (i.e. non-moving)
+     * camera. When set to true, might improve detection accuracy for moving
+     * objects. Default: false.
+     * 
+ * + * bool stationary_camera = 1; + */ + public Builder clearStationaryCamera() { + + stationaryCamera_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig) + private static final com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StreamingLabelDetectionConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StreamingLabelDetectionConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingLabelDetectionConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingLabelDetectionConfigOrBuilder.java new file mode 100644 index 000000000000..260d8ddafd6f --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingLabelDetectionConfigOrBuilder.java @@ -0,0 +1,23 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface StreamingLabelDetectionConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Whether the video has been captured from a stationary (i.e. non-moving)
+   * camera. When set to true, might improve detection accuracy for moving
+   * objects. Default: false.
+   * 
+ * + * bool stationary_camera = 1; + */ + boolean getStationaryCamera(); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingObjectTrackingConfig.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingObjectTrackingConfig.java new file mode 100644 index 000000000000..70742a3d15f7 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingObjectTrackingConfig.java @@ -0,0 +1,461 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Config for STREAMING_OBJECT_TRACKING.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig} + */ +public final class StreamingObjectTrackingConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig) + StreamingObjectTrackingConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use StreamingObjectTrackingConfig.newBuilder() to construct. + private StreamingObjectTrackingConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StreamingObjectTrackingConfig() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StreamingObjectTrackingConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingObjectTrackingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingObjectTrackingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig.class, + com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig.Builder + .class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig other = + (com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Config for STREAMING_OBJECT_TRACKING.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig) + com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingObjectTrackingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingObjectTrackingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig.class, + com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingObjectTrackingConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig + getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig build() { + com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig + buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig result = + new com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig) { + return mergeFrom( + (com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig other) { + if (other + == com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig + .getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig) + private static final com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StreamingObjectTrackingConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StreamingObjectTrackingConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingObjectTrackingConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingObjectTrackingConfigOrBuilder.java new file mode 100644 index 000000000000..4c572a00c7cc --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingObjectTrackingConfigOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface StreamingObjectTrackingConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig) + com.google.protobuf.MessageOrBuilder {} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingShotChangeDetectionConfig.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingShotChangeDetectionConfig.java new file mode 100644 index 000000000000..1f4ea411fac1 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingShotChangeDetectionConfig.java @@ -0,0 +1,467 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Config for SHOT_CHANGE_DETECTION in streaming mode.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig} + */ +public final class StreamingShotChangeDetectionConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig) + StreamingShotChangeDetectionConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use StreamingShotChangeDetectionConfig.newBuilder() to construct. + private StreamingShotChangeDetectionConfig( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StreamingShotChangeDetectionConfig() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StreamingShotChangeDetectionConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingShotChangeDetectionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingShotChangeDetectionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig.class, + com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig.Builder + .class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig other = + (com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Config for SHOT_CHANGE_DETECTION in streaming mode.
+   * 
+ * + * Protobuf type {@code + * google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig) + com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingShotChangeDetectionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingShotChangeDetectionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig.class, + com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + .Builder.class); + } + + // Construct using + // com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingShotChangeDetectionConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig build() { + com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig result = + new com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig) { + return mergeFrom( + (com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig other) { + if (other + == com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + .getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig) + private static final com.google.cloud.videointelligence.v1p3beta1 + .StreamingShotChangeDetectionConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StreamingShotChangeDetectionConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StreamingShotChangeDetectionConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingShotChangeDetectionConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingShotChangeDetectionConfigOrBuilder.java new file mode 100644 index 000000000000..3588e1117c7e --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingShotChangeDetectionConfigOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface StreamingShotChangeDetectionConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig) + com.google.protobuf.MessageOrBuilder {} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingStorageConfig.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingStorageConfig.java new file mode 100644 index 000000000000..bc9126724cff --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingStorageConfig.java @@ -0,0 +1,764 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Config for streaming storage option.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig} + */ +public final class StreamingStorageConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig) + StreamingStorageConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use StreamingStorageConfig.newBuilder() to construct. + private StreamingStorageConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StreamingStorageConfig() { + enableStorageAnnotationResult_ = false; + annotationResultStorageDirectory_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StreamingStorageConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + enableStorageAnnotationResult_ = input.readBool(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + annotationResultStorageDirectory_ = s; + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingStorageConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingStorageConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig.class, + com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig.Builder.class); + } + + public static final int ENABLE_STORAGE_ANNOTATION_RESULT_FIELD_NUMBER = 1; + private boolean enableStorageAnnotationResult_; + /** + * + * + *
+   * Enable streaming storage. Default: false.
+   * 
+ * + * bool enable_storage_annotation_result = 1; + */ + public boolean getEnableStorageAnnotationResult() { + return enableStorageAnnotationResult_; + } + + public static final int ANNOTATION_RESULT_STORAGE_DIRECTORY_FIELD_NUMBER = 3; + private volatile java.lang.Object annotationResultStorageDirectory_; + /** + * + * + *
+   * GCS URI to store all annotation results for one client. Client should
+   * specify this field as the top-level storage directory. Annotation results
+   * of different sessions will be put into different sub-directories denoted
+   * by project_name and session_id. All sub-directories will be auto generated
+   * by program and will be made accessible to client in response proto.
+   * URIs must be specified in the following format: `gs://bucket-id/object-id`
+   * `bucket-id` should be a valid GCS bucket created by client and bucket
+   * permission shall also be configured properly. `object-id` can be arbitrary
+   * string that make sense to client. Other URI formats will return error and
+   * cause GCS write failure.
+   * 
+ * + * string annotation_result_storage_directory = 3; + */ + public java.lang.String getAnnotationResultStorageDirectory() { + java.lang.Object ref = annotationResultStorageDirectory_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotationResultStorageDirectory_ = s; + return s; + } + } + /** + * + * + *
+   * GCS URI to store all annotation results for one client. Client should
+   * specify this field as the top-level storage directory. Annotation results
+   * of different sessions will be put into different sub-directories denoted
+   * by project_name and session_id. All sub-directories will be auto generated
+   * by program and will be made accessible to client in response proto.
+   * URIs must be specified in the following format: `gs://bucket-id/object-id`
+   * `bucket-id` should be a valid GCS bucket created by client and bucket
+   * permission shall also be configured properly. `object-id` can be arbitrary
+   * string that make sense to client. Other URI formats will return error and
+   * cause GCS write failure.
+   * 
+ * + * string annotation_result_storage_directory = 3; + */ + public com.google.protobuf.ByteString getAnnotationResultStorageDirectoryBytes() { + java.lang.Object ref = annotationResultStorageDirectory_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationResultStorageDirectory_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (enableStorageAnnotationResult_ != false) { + output.writeBool(1, enableStorageAnnotationResult_); + } + if (!getAnnotationResultStorageDirectoryBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 3, annotationResultStorageDirectory_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enableStorageAnnotationResult_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableStorageAnnotationResult_); + } + if (!getAnnotationResultStorageDirectoryBytes().isEmpty()) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize( + 3, annotationResultStorageDirectory_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig other = + (com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig) obj; + + boolean result = true; + result = + result && (getEnableStorageAnnotationResult() == other.getEnableStorageAnnotationResult()); + result = + result + && getAnnotationResultStorageDirectory() + .equals(other.getAnnotationResultStorageDirectory()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLE_STORAGE_ANNOTATION_RESULT_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableStorageAnnotationResult()); + hash = (37 * hash) + ANNOTATION_RESULT_STORAGE_DIRECTORY_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationResultStorageDirectory().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Config for streaming storage option.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig) + com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingStorageConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingStorageConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig.class, + com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig.Builder.class); + } + + // Construct using + // com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + enableStorageAnnotationResult_ = false; + + annotationResultStorageDirectory_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingStorageConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig + getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig build() { + com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig result = + new com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig(this); + result.enableStorageAnnotationResult_ = enableStorageAnnotationResult_; + result.annotationResultStorageDirectory_ = annotationResultStorageDirectory_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig) { + return mergeFrom( + (com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig other) { + if (other + == com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig + .getDefaultInstance()) return this; + if (other.getEnableStorageAnnotationResult() != false) { + setEnableStorageAnnotationResult(other.getEnableStorageAnnotationResult()); + } + if (!other.getAnnotationResultStorageDirectory().isEmpty()) { + annotationResultStorageDirectory_ = other.annotationResultStorageDirectory_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean enableStorageAnnotationResult_; + /** + * + * + *
+     * Enable streaming storage. Default: false.
+     * 
+ * + * bool enable_storage_annotation_result = 1; + */ + public boolean getEnableStorageAnnotationResult() { + return enableStorageAnnotationResult_; + } + /** + * + * + *
+     * Enable streaming storage. Default: false.
+     * 
+ * + * bool enable_storage_annotation_result = 1; + */ + public Builder setEnableStorageAnnotationResult(boolean value) { + + enableStorageAnnotationResult_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Enable streaming storage. Default: false.
+     * 
+ * + * bool enable_storage_annotation_result = 1; + */ + public Builder clearEnableStorageAnnotationResult() { + + enableStorageAnnotationResult_ = false; + onChanged(); + return this; + } + + private java.lang.Object annotationResultStorageDirectory_ = ""; + /** + * + * + *
+     * GCS URI to store all annotation results for one client. Client should
+     * specify this field as the top-level storage directory. Annotation results
+     * of different sessions will be put into different sub-directories denoted
+     * by project_name and session_id. All sub-directories will be auto generated
+     * by program and will be made accessible to client in response proto.
+     * URIs must be specified in the following format: `gs://bucket-id/object-id`
+     * `bucket-id` should be a valid GCS bucket created by client and bucket
+     * permission shall also be configured properly. `object-id` can be arbitrary
+     * string that make sense to client. Other URI formats will return error and
+     * cause GCS write failure.
+     * 
+ * + * string annotation_result_storage_directory = 3; + */ + public java.lang.String getAnnotationResultStorageDirectory() { + java.lang.Object ref = annotationResultStorageDirectory_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotationResultStorageDirectory_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * GCS URI to store all annotation results for one client. Client should
+     * specify this field as the top-level storage directory. Annotation results
+     * of different sessions will be put into different sub-directories denoted
+     * by project_name and session_id. All sub-directories will be auto generated
+     * by program and will be made accessible to client in response proto.
+     * URIs must be specified in the following format: `gs://bucket-id/object-id`
+     * `bucket-id` should be a valid GCS bucket created by client and bucket
+     * permission shall also be configured properly. `object-id` can be arbitrary
+     * string that make sense to client. Other URI formats will return error and
+     * cause GCS write failure.
+     * 
+ * + * string annotation_result_storage_directory = 3; + */ + public com.google.protobuf.ByteString getAnnotationResultStorageDirectoryBytes() { + java.lang.Object ref = annotationResultStorageDirectory_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationResultStorageDirectory_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * GCS URI to store all annotation results for one client. Client should
+     * specify this field as the top-level storage directory. Annotation results
+     * of different sessions will be put into different sub-directories denoted
+     * by project_name and session_id. All sub-directories will be auto generated
+     * by program and will be made accessible to client in response proto.
+     * URIs must be specified in the following format: `gs://bucket-id/object-id`
+     * `bucket-id` should be a valid GCS bucket created by client and bucket
+     * permission shall also be configured properly. `object-id` can be arbitrary
+     * string that make sense to client. Other URI formats will return error and
+     * cause GCS write failure.
+     * 
+ * + * string annotation_result_storage_directory = 3; + */ + public Builder setAnnotationResultStorageDirectory(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + annotationResultStorageDirectory_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * GCS URI to store all annotation results for one client. Client should
+     * specify this field as the top-level storage directory. Annotation results
+     * of different sessions will be put into different sub-directories denoted
+     * by project_name and session_id. All sub-directories will be auto generated
+     * by program and will be made accessible to client in response proto.
+     * URIs must be specified in the following format: `gs://bucket-id/object-id`
+     * `bucket-id` should be a valid GCS bucket created by client and bucket
+     * permission shall also be configured properly. `object-id` can be arbitrary
+     * string that make sense to client. Other URI formats will return error and
+     * cause GCS write failure.
+     * 
+ * + * string annotation_result_storage_directory = 3; + */ + public Builder clearAnnotationResultStorageDirectory() { + + annotationResultStorageDirectory_ = + getDefaultInstance().getAnnotationResultStorageDirectory(); + onChanged(); + return this; + } + /** + * + * + *
+     * GCS URI to store all annotation results for one client. Client should
+     * specify this field as the top-level storage directory. Annotation results
+     * of different sessions will be put into different sub-directories denoted
+     * by project_name and session_id. All sub-directories will be auto generated
+     * by program and will be made accessible to client in response proto.
+     * URIs must be specified in the following format: `gs://bucket-id/object-id`
+     * `bucket-id` should be a valid GCS bucket created by client and bucket
+     * permission shall also be configured properly. `object-id` can be arbitrary
+     * string that make sense to client. Other URI formats will return error and
+     * cause GCS write failure.
+     * 
+ * + * string annotation_result_storage_directory = 3; + */ + public Builder setAnnotationResultStorageDirectoryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + annotationResultStorageDirectory_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig) + private static final com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StreamingStorageConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StreamingStorageConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingStorageConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingStorageConfigOrBuilder.java new file mode 100644 index 000000000000..241956db876c --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingStorageConfigOrBuilder.java @@ -0,0 +1,60 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface StreamingStorageConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Enable streaming storage. Default: false.
+   * 
+ * + * bool enable_storage_annotation_result = 1; + */ + boolean getEnableStorageAnnotationResult(); + + /** + * + * + *
+   * GCS URI to store all annotation results for one client. Client should
+   * specify this field as the top-level storage directory. Annotation results
+   * of different sessions will be put into different sub-directories denoted
+   * by project_name and session_id. All sub-directories will be auto generated
+   * by program and will be made accessible to client in response proto.
+   * URIs must be specified in the following format: `gs://bucket-id/object-id`
+   * `bucket-id` should be a valid GCS bucket created by client and bucket
+   * permission shall also be configured properly. `object-id` can be arbitrary
+   * string that make sense to client. Other URI formats will return error and
+   * cause GCS write failure.
+   * 
+ * + * string annotation_result_storage_directory = 3; + */ + java.lang.String getAnnotationResultStorageDirectory(); + /** + * + * + *
+   * GCS URI to store all annotation results for one client. Client should
+   * specify this field as the top-level storage directory. Annotation results
+   * of different sessions will be put into different sub-directories denoted
+   * by project_name and session_id. All sub-directories will be auto generated
+   * by program and will be made accessible to client in response proto.
+   * URIs must be specified in the following format: `gs://bucket-id/object-id`
+   * `bucket-id` should be a valid GCS bucket created by client and bucket
+   * permission shall also be configured properly. `object-id` can be arbitrary
+   * string that make sense to client. Other URI formats will return error and
+   * cause GCS write failure.
+   * 
+ * + * string annotation_result_storage_directory = 3; + */ + com.google.protobuf.ByteString getAnnotationResultStorageDirectoryBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoAnnotationResults.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoAnnotationResults.java new file mode 100644 index 000000000000..d04db2fc740f --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoAnnotationResults.java @@ -0,0 +1,2436 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Streaming annotation results corresponding to a portion of the video
+ * that is currently being processed.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults} + */ +public final class StreamingVideoAnnotationResults extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults) + StreamingVideoAnnotationResultsOrBuilder { + private static final long serialVersionUID = 0L; + // Use StreamingVideoAnnotationResults.newBuilder() to construct. + private StreamingVideoAnnotationResults( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StreamingVideoAnnotationResults() { + shotAnnotations_ = java.util.Collections.emptyList(); + labelAnnotations_ = java.util.Collections.emptyList(); + objectAnnotations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StreamingVideoAnnotationResults( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + shotAnnotations_ = + new java.util.ArrayList< + com.google.cloud.videointelligence.v1p3beta1.VideoSegment>(); + mutable_bitField0_ |= 0x00000001; + } + shotAnnotations_.add( + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.parser(), + extensionRegistry)); + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + labelAnnotations_ = + new java.util.ArrayList< + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation>(); + mutable_bitField0_ |= 0x00000002; + } + labelAnnotations_.add( + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.parser(), + extensionRegistry)); + break; + } + case 26: + { + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation.Builder + subBuilder = null; + if (explicitAnnotation_ != null) { + subBuilder = explicitAnnotation_.toBuilder(); + } + explicitAnnotation_ = + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(explicitAnnotation_); + explicitAnnotation_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + objectAnnotations_ = + new java.util.ArrayList< + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation>(); + mutable_bitField0_ |= 0x00000008; + } + objectAnnotations_.add( + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation + .parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + shotAnnotations_ = java.util.Collections.unmodifiableList(shotAnnotations_); + } + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); + } + if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + objectAnnotations_ = java.util.Collections.unmodifiableList(objectAnnotations_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingVideoAnnotationResults_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingVideoAnnotationResults_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults.class, + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults.Builder + .class); + } + + private int bitField0_; + public static final int SHOT_ANNOTATIONS_FIELD_NUMBER = 1; + private java.util.List + shotAnnotations_; + /** + * + * + *
+   * Shot annotation results. Each shot is represented as a video segment.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 1; + * + */ + public java.util.List + getShotAnnotationsList() { + return shotAnnotations_; + } + /** + * + * + *
+   * Shot annotation results. Each shot is represented as a video segment.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder> + getShotAnnotationsOrBuilderList() { + return shotAnnotations_; + } + /** + * + * + *
+   * Shot annotation results. Each shot is represented as a video segment.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 1; + * + */ + public int getShotAnnotationsCount() { + return shotAnnotations_.size(); + } + /** + * + * + *
+   * Shot annotation results. Each shot is represented as a video segment.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegment getShotAnnotations(int index) { + return shotAnnotations_.get(index); + } + /** + * + * + *
+   * Shot annotation results. Each shot is represented as a video segment.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder + getShotAnnotationsOrBuilder(int index) { + return shotAnnotations_.get(index); + } + + public static final int LABEL_ANNOTATIONS_FIELD_NUMBER = 2; + private java.util.List + labelAnnotations_; + /** + * + * + *
+   * Label annotation results.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation label_annotations = 2; + * + */ + public java.util.List + getLabelAnnotationsList() { + return labelAnnotations_; + } + /** + * + * + *
+   * Label annotation results.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation label_annotations = 2; + * + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder> + getLabelAnnotationsOrBuilderList() { + return labelAnnotations_; + } + /** + * + * + *
+   * Label annotation results.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation label_annotations = 2; + * + */ + public int getLabelAnnotationsCount() { + return labelAnnotations_.size(); + } + /** + * + * + *
+   * Label annotation results.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation label_annotations = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation getLabelAnnotations( + int index) { + return labelAnnotations_.get(index); + } + /** + * + * + *
+   * Label annotation results.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation label_annotations = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder + getLabelAnnotationsOrBuilder(int index) { + return labelAnnotations_.get(index); + } + + public static final int EXPLICIT_ANNOTATION_FIELD_NUMBER = 3; + private com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation + explicitAnnotation_; + /** + * + * + *
+   * Explicit content detection results.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation explicit_annotation = 3; + * + */ + public boolean hasExplicitAnnotation() { + return explicitAnnotation_ != null; + } + /** + * + * + *
+   * Explicit content detection results.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation explicit_annotation = 3; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation + getExplicitAnnotation() { + return explicitAnnotation_ == null + ? com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation + .getDefaultInstance() + : explicitAnnotation_; + } + /** + * + * + *
+   * Explicit content detection results.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation explicit_annotation = 3; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotationOrBuilder + getExplicitAnnotationOrBuilder() { + return getExplicitAnnotation(); + } + + public static final int OBJECT_ANNOTATIONS_FIELD_NUMBER = 4; + private java.util.List + objectAnnotations_; + /** + * + * + *
+   * Object tracking results.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 4; + * + */ + public java.util.List + getObjectAnnotationsList() { + return objectAnnotations_; + } + /** + * + * + *
+   * Object tracking results.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 4; + * + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotationOrBuilder> + getObjectAnnotationsOrBuilderList() { + return objectAnnotations_; + } + /** + * + * + *
+   * Object tracking results.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 4; + * + */ + public int getObjectAnnotationsCount() { + return objectAnnotations_.size(); + } + /** + * + * + *
+   * Object tracking results.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 4; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation getObjectAnnotations( + int index) { + return objectAnnotations_.get(index); + } + /** + * + * + *
+   * Object tracking results.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 4; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotationOrBuilder + getObjectAnnotationsOrBuilder(int index) { + return objectAnnotations_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < shotAnnotations_.size(); i++) { + output.writeMessage(1, shotAnnotations_.get(i)); + } + for (int i = 0; i < labelAnnotations_.size(); i++) { + output.writeMessage(2, labelAnnotations_.get(i)); + } + if (explicitAnnotation_ != null) { + output.writeMessage(3, getExplicitAnnotation()); + } + for (int i = 0; i < objectAnnotations_.size(); i++) { + output.writeMessage(4, objectAnnotations_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < shotAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, shotAnnotations_.get(i)); + } + for (int i = 0; i < labelAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, labelAnnotations_.get(i)); + } + if (explicitAnnotation_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getExplicitAnnotation()); + } + for (int i = 0; i < objectAnnotations_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, objectAnnotations_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults other = + (com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults) obj; + + boolean result = true; + result = result && getShotAnnotationsList().equals(other.getShotAnnotationsList()); + result = result && getLabelAnnotationsList().equals(other.getLabelAnnotationsList()); + result = result && (hasExplicitAnnotation() == other.hasExplicitAnnotation()); + if (hasExplicitAnnotation()) { + result = result && getExplicitAnnotation().equals(other.getExplicitAnnotation()); + } + result = result && getObjectAnnotationsList().equals(other.getObjectAnnotationsList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getShotAnnotationsCount() > 0) { + hash = (37 * hash) + SHOT_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getShotAnnotationsList().hashCode(); + } + if (getLabelAnnotationsCount() > 0) { + hash = (37 * hash) + LABEL_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getLabelAnnotationsList().hashCode(); + } + if (hasExplicitAnnotation()) { + hash = (37 * hash) + EXPLICIT_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getExplicitAnnotation().hashCode(); + } + if (getObjectAnnotationsCount() > 0) { + hash = (37 * hash) + OBJECT_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getObjectAnnotationsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Streaming annotation results corresponding to a portion of the video
+   * that is currently being processed.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults) + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResultsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingVideoAnnotationResults_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingVideoAnnotationResults_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults.class, + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults.Builder + .class); + } + + // Construct using + // com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getShotAnnotationsFieldBuilder(); + getLabelAnnotationsFieldBuilder(); + getObjectAnnotationsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (shotAnnotationsBuilder_ == null) { + shotAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + shotAnnotationsBuilder_.clear(); + } + if (labelAnnotationsBuilder_ == null) { + labelAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + labelAnnotationsBuilder_.clear(); + } + if (explicitAnnotationBuilder_ == null) { + explicitAnnotation_ = null; + } else { + explicitAnnotation_ = null; + explicitAnnotationBuilder_ = null; + } + if (objectAnnotationsBuilder_ == null) { + objectAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + objectAnnotationsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingVideoAnnotationResults_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults + getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults build() { + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults + buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults result = + new com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (shotAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + shotAnnotations_ = java.util.Collections.unmodifiableList(shotAnnotations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.shotAnnotations_ = shotAnnotations_; + } else { + result.shotAnnotations_ = shotAnnotationsBuilder_.build(); + } + if (labelAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.labelAnnotations_ = labelAnnotations_; + } else { + result.labelAnnotations_ = labelAnnotationsBuilder_.build(); + } + if (explicitAnnotationBuilder_ == null) { + result.explicitAnnotation_ = explicitAnnotation_; + } else { + result.explicitAnnotation_ = explicitAnnotationBuilder_.build(); + } + if (objectAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008)) { + objectAnnotations_ = java.util.Collections.unmodifiableList(objectAnnotations_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.objectAnnotations_ = objectAnnotations_; + } else { + result.objectAnnotations_ = objectAnnotationsBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults) { + return mergeFrom( + (com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults other) { + if (other + == com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults + .getDefaultInstance()) return this; + if (shotAnnotationsBuilder_ == null) { + if (!other.shotAnnotations_.isEmpty()) { + if (shotAnnotations_.isEmpty()) { + shotAnnotations_ = other.shotAnnotations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureShotAnnotationsIsMutable(); + shotAnnotations_.addAll(other.shotAnnotations_); + } + onChanged(); + } + } else { + if (!other.shotAnnotations_.isEmpty()) { + if (shotAnnotationsBuilder_.isEmpty()) { + shotAnnotationsBuilder_.dispose(); + shotAnnotationsBuilder_ = null; + shotAnnotations_ = other.shotAnnotations_; + bitField0_ = (bitField0_ & ~0x00000001); + shotAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getShotAnnotationsFieldBuilder() + : null; + } else { + shotAnnotationsBuilder_.addAllMessages(other.shotAnnotations_); + } + } + } + if (labelAnnotationsBuilder_ == null) { + if (!other.labelAnnotations_.isEmpty()) { + if (labelAnnotations_.isEmpty()) { + labelAnnotations_ = other.labelAnnotations_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.addAll(other.labelAnnotations_); + } + onChanged(); + } + } else { + if (!other.labelAnnotations_.isEmpty()) { + if (labelAnnotationsBuilder_.isEmpty()) { + labelAnnotationsBuilder_.dispose(); + labelAnnotationsBuilder_ = null; + labelAnnotations_ = other.labelAnnotations_; + bitField0_ = (bitField0_ & ~0x00000002); + labelAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLabelAnnotationsFieldBuilder() + : null; + } else { + labelAnnotationsBuilder_.addAllMessages(other.labelAnnotations_); + } + } + } + if (other.hasExplicitAnnotation()) { + mergeExplicitAnnotation(other.getExplicitAnnotation()); + } + if (objectAnnotationsBuilder_ == null) { + if (!other.objectAnnotations_.isEmpty()) { + if (objectAnnotations_.isEmpty()) { + objectAnnotations_ = other.objectAnnotations_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.addAll(other.objectAnnotations_); + } + onChanged(); + } + } else { + if (!other.objectAnnotations_.isEmpty()) { + if (objectAnnotationsBuilder_.isEmpty()) { + objectAnnotationsBuilder_.dispose(); + objectAnnotationsBuilder_ = null; + objectAnnotations_ = other.objectAnnotations_; + bitField0_ = (bitField0_ & ~0x00000008); + objectAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getObjectAnnotationsFieldBuilder() + : null; + } else { + objectAnnotationsBuilder_.addAllMessages(other.objectAnnotations_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + shotAnnotations_ = java.util.Collections.emptyList(); + + private void ensureShotAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + shotAnnotations_ = + new java.util.ArrayList( + shotAnnotations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.VideoSegment, + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder, + com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder> + shotAnnotationsBuilder_; + + /** + * + * + *
+     * Shot annotation results. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 1; + * + */ + public java.util.List + getShotAnnotationsList() { + if (shotAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(shotAnnotations_); + } else { + return shotAnnotationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Shot annotation results. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 1; + * + */ + public int getShotAnnotationsCount() { + if (shotAnnotationsBuilder_ == null) { + return shotAnnotations_.size(); + } else { + return shotAnnotationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Shot annotation results. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegment getShotAnnotations(int index) { + if (shotAnnotationsBuilder_ == null) { + return shotAnnotations_.get(index); + } else { + return shotAnnotationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Shot annotation results. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 1; + * + */ + public Builder setShotAnnotations( + int index, com.google.cloud.videointelligence.v1p3beta1.VideoSegment value) { + if (shotAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureShotAnnotationsIsMutable(); + shotAnnotations_.set(index, value); + onChanged(); + } else { + shotAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Shot annotation results. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 1; + * + */ + public Builder setShotAnnotations( + int index, + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder builderForValue) { + if (shotAnnotationsBuilder_ == null) { + ensureShotAnnotationsIsMutable(); + shotAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + shotAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Shot annotation results. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 1; + * + */ + public Builder addShotAnnotations( + com.google.cloud.videointelligence.v1p3beta1.VideoSegment value) { + if (shotAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureShotAnnotationsIsMutable(); + shotAnnotations_.add(value); + onChanged(); + } else { + shotAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Shot annotation results. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 1; + * + */ + public Builder addShotAnnotations( + int index, com.google.cloud.videointelligence.v1p3beta1.VideoSegment value) { + if (shotAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureShotAnnotationsIsMutable(); + shotAnnotations_.add(index, value); + onChanged(); + } else { + shotAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Shot annotation results. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 1; + * + */ + public Builder addShotAnnotations( + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder builderForValue) { + if (shotAnnotationsBuilder_ == null) { + ensureShotAnnotationsIsMutable(); + shotAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + shotAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Shot annotation results. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 1; + * + */ + public Builder addShotAnnotations( + int index, + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder builderForValue) { + if (shotAnnotationsBuilder_ == null) { + ensureShotAnnotationsIsMutable(); + shotAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + shotAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Shot annotation results. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 1; + * + */ + public Builder addAllShotAnnotations( + java.lang.Iterable + values) { + if (shotAnnotationsBuilder_ == null) { + ensureShotAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, shotAnnotations_); + onChanged(); + } else { + shotAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Shot annotation results. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 1; + * + */ + public Builder clearShotAnnotations() { + if (shotAnnotationsBuilder_ == null) { + shotAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + shotAnnotationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Shot annotation results. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 1; + * + */ + public Builder removeShotAnnotations(int index) { + if (shotAnnotationsBuilder_ == null) { + ensureShotAnnotationsIsMutable(); + shotAnnotations_.remove(index); + onChanged(); + } else { + shotAnnotationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Shot annotation results. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder + getShotAnnotationsBuilder(int index) { + return getShotAnnotationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Shot annotation results. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder + getShotAnnotationsOrBuilder(int index) { + if (shotAnnotationsBuilder_ == null) { + return shotAnnotations_.get(index); + } else { + return shotAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Shot annotation results. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder> + getShotAnnotationsOrBuilderList() { + if (shotAnnotationsBuilder_ != null) { + return shotAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(shotAnnotations_); + } + } + /** + * + * + *
+     * Shot annotation results. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder + addShotAnnotationsBuilder() { + return getShotAnnotationsFieldBuilder() + .addBuilder( + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.getDefaultInstance()); + } + /** + * + * + *
+     * Shot annotation results. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder + addShotAnnotationsBuilder(int index) { + return getShotAnnotationsFieldBuilder() + .addBuilder( + index, + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.getDefaultInstance()); + } + /** + * + * + *
+     * Shot annotation results. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 1; + * + */ + public java.util.List + getShotAnnotationsBuilderList() { + return getShotAnnotationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.VideoSegment, + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder, + com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder> + getShotAnnotationsFieldBuilder() { + if (shotAnnotationsBuilder_ == null) { + shotAnnotationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.VideoSegment, + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder, + com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder>( + shotAnnotations_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + shotAnnotations_ = null; + } + return shotAnnotationsBuilder_; + } + + private java.util.List + labelAnnotations_ = java.util.Collections.emptyList(); + + private void ensureLabelAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + labelAnnotations_ = + new java.util.ArrayList( + labelAnnotations_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder> + labelAnnotationsBuilder_; + + /** + * + * + *
+     * Label annotation results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation label_annotations = 2; + * + */ + public java.util.List + getLabelAnnotationsList() { + if (labelAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(labelAnnotations_); + } else { + return labelAnnotationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Label annotation results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation label_annotations = 2; + * + */ + public int getLabelAnnotationsCount() { + if (labelAnnotationsBuilder_ == null) { + return labelAnnotations_.size(); + } else { + return labelAnnotationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Label annotation results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation label_annotations = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation getLabelAnnotations( + int index) { + if (labelAnnotationsBuilder_ == null) { + return labelAnnotations_.get(index); + } else { + return labelAnnotationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Label annotation results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation label_annotations = 2; + * + */ + public Builder setLabelAnnotations( + int index, com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation value) { + if (labelAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.set(index, value); + onChanged(); + } else { + labelAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Label annotation results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation label_annotations = 2; + * + */ + public Builder setLabelAnnotations( + int index, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder builderForValue) { + if (labelAnnotationsBuilder_ == null) { + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + labelAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Label annotation results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation label_annotations = 2; + * + */ + public Builder addLabelAnnotations( + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation value) { + if (labelAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.add(value); + onChanged(); + } else { + labelAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Label annotation results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation label_annotations = 2; + * + */ + public Builder addLabelAnnotations( + int index, com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation value) { + if (labelAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.add(index, value); + onChanged(); + } else { + labelAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Label annotation results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation label_annotations = 2; + * + */ + public Builder addLabelAnnotations( + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder builderForValue) { + if (labelAnnotationsBuilder_ == null) { + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + labelAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Label annotation results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation label_annotations = 2; + * + */ + public Builder addLabelAnnotations( + int index, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder builderForValue) { + if (labelAnnotationsBuilder_ == null) { + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + labelAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Label annotation results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation label_annotations = 2; + * + */ + public Builder addAllLabelAnnotations( + java.lang.Iterable + values) { + if (labelAnnotationsBuilder_ == null) { + ensureLabelAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, labelAnnotations_); + onChanged(); + } else { + labelAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Label annotation results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation label_annotations = 2; + * + */ + public Builder clearLabelAnnotations() { + if (labelAnnotationsBuilder_ == null) { + labelAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + labelAnnotationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Label annotation results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation label_annotations = 2; + * + */ + public Builder removeLabelAnnotations(int index) { + if (labelAnnotationsBuilder_ == null) { + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.remove(index); + onChanged(); + } else { + labelAnnotationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Label annotation results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation label_annotations = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder + getLabelAnnotationsBuilder(int index) { + return getLabelAnnotationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Label annotation results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation label_annotations = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder + getLabelAnnotationsOrBuilder(int index) { + if (labelAnnotationsBuilder_ == null) { + return labelAnnotations_.get(index); + } else { + return labelAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Label annotation results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation label_annotations = 2; + * + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder> + getLabelAnnotationsOrBuilderList() { + if (labelAnnotationsBuilder_ != null) { + return labelAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(labelAnnotations_); + } + } + /** + * + * + *
+     * Label annotation results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation label_annotations = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder + addLabelAnnotationsBuilder() { + return getLabelAnnotationsFieldBuilder() + .addBuilder( + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.getDefaultInstance()); + } + /** + * + * + *
+     * Label annotation results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation label_annotations = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder + addLabelAnnotationsBuilder(int index) { + return getLabelAnnotationsFieldBuilder() + .addBuilder( + index, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.getDefaultInstance()); + } + /** + * + * + *
+     * Label annotation results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation label_annotations = 2; + * + */ + public java.util.List + getLabelAnnotationsBuilderList() { + return getLabelAnnotationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder> + getLabelAnnotationsFieldBuilder() { + if (labelAnnotationsBuilder_ == null) { + labelAnnotationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder>( + labelAnnotations_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + labelAnnotations_ = null; + } + return labelAnnotationsBuilder_; + } + + private com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation + explicitAnnotation_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation.Builder, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotationOrBuilder> + explicitAnnotationBuilder_; + /** + * + * + *
+     * Explicit content detection results.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation explicit_annotation = 3; + * + */ + public boolean hasExplicitAnnotation() { + return explicitAnnotationBuilder_ != null || explicitAnnotation_ != null; + } + /** + * + * + *
+     * Explicit content detection results.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation explicit_annotation = 3; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation + getExplicitAnnotation() { + if (explicitAnnotationBuilder_ == null) { + return explicitAnnotation_ == null + ? com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation + .getDefaultInstance() + : explicitAnnotation_; + } else { + return explicitAnnotationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Explicit content detection results.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation explicit_annotation = 3; + * + */ + public Builder setExplicitAnnotation( + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation value) { + if (explicitAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + explicitAnnotation_ = value; + onChanged(); + } else { + explicitAnnotationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Explicit content detection results.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation explicit_annotation = 3; + * + */ + public Builder setExplicitAnnotation( + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation.Builder + builderForValue) { + if (explicitAnnotationBuilder_ == null) { + explicitAnnotation_ = builderForValue.build(); + onChanged(); + } else { + explicitAnnotationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Explicit content detection results.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation explicit_annotation = 3; + * + */ + public Builder mergeExplicitAnnotation( + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation value) { + if (explicitAnnotationBuilder_ == null) { + if (explicitAnnotation_ != null) { + explicitAnnotation_ = + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation.newBuilder( + explicitAnnotation_) + .mergeFrom(value) + .buildPartial(); + } else { + explicitAnnotation_ = value; + } + onChanged(); + } else { + explicitAnnotationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Explicit content detection results.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation explicit_annotation = 3; + * + */ + public Builder clearExplicitAnnotation() { + if (explicitAnnotationBuilder_ == null) { + explicitAnnotation_ = null; + onChanged(); + } else { + explicitAnnotation_ = null; + explicitAnnotationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Explicit content detection results.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation explicit_annotation = 3; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation.Builder + getExplicitAnnotationBuilder() { + + onChanged(); + return getExplicitAnnotationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Explicit content detection results.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation explicit_annotation = 3; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotationOrBuilder + getExplicitAnnotationOrBuilder() { + if (explicitAnnotationBuilder_ != null) { + return explicitAnnotationBuilder_.getMessageOrBuilder(); + } else { + return explicitAnnotation_ == null + ? com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation + .getDefaultInstance() + : explicitAnnotation_; + } + } + /** + * + * + *
+     * Explicit content detection results.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation explicit_annotation = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation.Builder, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotationOrBuilder> + getExplicitAnnotationFieldBuilder() { + if (explicitAnnotationBuilder_ == null) { + explicitAnnotationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation.Builder, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotationOrBuilder>( + getExplicitAnnotation(), getParentForChildren(), isClean()); + explicitAnnotation_ = null; + } + return explicitAnnotationBuilder_; + } + + private java.util.List + objectAnnotations_ = java.util.Collections.emptyList(); + + private void ensureObjectAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000008) == 0x00000008)) { + objectAnnotations_ = + new java.util.ArrayList< + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation>( + objectAnnotations_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.Builder, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotationOrBuilder> + objectAnnotationsBuilder_; + + /** + * + * + *
+     * Object tracking results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 4; + * + */ + public java.util.List + getObjectAnnotationsList() { + if (objectAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(objectAnnotations_); + } else { + return objectAnnotationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Object tracking results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 4; + * + */ + public int getObjectAnnotationsCount() { + if (objectAnnotationsBuilder_ == null) { + return objectAnnotations_.size(); + } else { + return objectAnnotationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Object tracking results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 4; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation + getObjectAnnotations(int index) { + if (objectAnnotationsBuilder_ == null) { + return objectAnnotations_.get(index); + } else { + return objectAnnotationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Object tracking results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 4; + * + */ + public Builder setObjectAnnotations( + int index, com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation value) { + if (objectAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.set(index, value); + onChanged(); + } else { + objectAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Object tracking results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 4; + * + */ + public Builder setObjectAnnotations( + int index, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.Builder + builderForValue) { + if (objectAnnotationsBuilder_ == null) { + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + objectAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Object tracking results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 4; + * + */ + public Builder addObjectAnnotations( + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation value) { + if (objectAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.add(value); + onChanged(); + } else { + objectAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Object tracking results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 4; + * + */ + public Builder addObjectAnnotations( + int index, com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation value) { + if (objectAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.add(index, value); + onChanged(); + } else { + objectAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Object tracking results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 4; + * + */ + public Builder addObjectAnnotations( + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.Builder + builderForValue) { + if (objectAnnotationsBuilder_ == null) { + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + objectAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Object tracking results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 4; + * + */ + public Builder addObjectAnnotations( + int index, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.Builder + builderForValue) { + if (objectAnnotationsBuilder_ == null) { + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + objectAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Object tracking results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 4; + * + */ + public Builder addAllObjectAnnotations( + java.lang.Iterable< + ? extends com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation> + values) { + if (objectAnnotationsBuilder_ == null) { + ensureObjectAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, objectAnnotations_); + onChanged(); + } else { + objectAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Object tracking results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 4; + * + */ + public Builder clearObjectAnnotations() { + if (objectAnnotationsBuilder_ == null) { + objectAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + objectAnnotationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Object tracking results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 4; + * + */ + public Builder removeObjectAnnotations(int index) { + if (objectAnnotationsBuilder_ == null) { + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.remove(index); + onChanged(); + } else { + objectAnnotationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Object tracking results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 4; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.Builder + getObjectAnnotationsBuilder(int index) { + return getObjectAnnotationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Object tracking results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 4; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotationOrBuilder + getObjectAnnotationsOrBuilder(int index) { + if (objectAnnotationsBuilder_ == null) { + return objectAnnotations_.get(index); + } else { + return objectAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Object tracking results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 4; + * + */ + public java.util.List< + ? extends + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotationOrBuilder> + getObjectAnnotationsOrBuilderList() { + if (objectAnnotationsBuilder_ != null) { + return objectAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(objectAnnotations_); + } + } + /** + * + * + *
+     * Object tracking results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 4; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.Builder + addObjectAnnotationsBuilder() { + return getObjectAnnotationsFieldBuilder() + .addBuilder( + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation + .getDefaultInstance()); + } + /** + * + * + *
+     * Object tracking results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 4; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.Builder + addObjectAnnotationsBuilder(int index) { + return getObjectAnnotationsFieldBuilder() + .addBuilder( + index, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation + .getDefaultInstance()); + } + /** + * + * + *
+     * Object tracking results.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 4; + * + */ + public java.util.List< + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.Builder> + getObjectAnnotationsBuilderList() { + return getObjectAnnotationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.Builder, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotationOrBuilder> + getObjectAnnotationsFieldBuilder() { + if (objectAnnotationsBuilder_ == null) { + objectAnnotationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.Builder, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotationOrBuilder>( + objectAnnotations_, + ((bitField0_ & 0x00000008) == 0x00000008), + getParentForChildren(), + isClean()); + objectAnnotations_ = null; + } + return objectAnnotationsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults) + private static final com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StreamingVideoAnnotationResults parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StreamingVideoAnnotationResults(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoAnnotationResultsOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoAnnotationResultsOrBuilder.java new file mode 100644 index 000000000000..30ab5053a79b --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoAnnotationResultsOrBuilder.java @@ -0,0 +1,232 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface StreamingVideoAnnotationResultsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Shot annotation results. Each shot is represented as a video segment.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 1; + * + */ + java.util.List + getShotAnnotationsList(); + /** + * + * + *
+   * Shot annotation results. Each shot is represented as a video segment.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 1; + * + */ + com.google.cloud.videointelligence.v1p3beta1.VideoSegment getShotAnnotations(int index); + /** + * + * + *
+   * Shot annotation results. Each shot is represented as a video segment.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 1; + * + */ + int getShotAnnotationsCount(); + /** + * + * + *
+   * Shot annotation results. Each shot is represented as a video segment.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 1; + * + */ + java.util.List + getShotAnnotationsOrBuilderList(); + /** + * + * + *
+   * Shot annotation results. Each shot is represented as a video segment.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 1; + * + */ + com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder getShotAnnotationsOrBuilder( + int index); + + /** + * + * + *
+   * Label annotation results.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation label_annotations = 2; + * + */ + java.util.List + getLabelAnnotationsList(); + /** + * + * + *
+   * Label annotation results.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation label_annotations = 2; + * + */ + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation getLabelAnnotations(int index); + /** + * + * + *
+   * Label annotation results.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation label_annotations = 2; + * + */ + int getLabelAnnotationsCount(); + /** + * + * + *
+   * Label annotation results.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation label_annotations = 2; + * + */ + java.util.List + getLabelAnnotationsOrBuilderList(); + /** + * + * + *
+   * Label annotation results.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation label_annotations = 2; + * + */ + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder + getLabelAnnotationsOrBuilder(int index); + + /** + * + * + *
+   * Explicit content detection results.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation explicit_annotation = 3; + * + */ + boolean hasExplicitAnnotation(); + /** + * + * + *
+   * Explicit content detection results.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation explicit_annotation = 3; + * + */ + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation getExplicitAnnotation(); + /** + * + * + *
+   * Explicit content detection results.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation explicit_annotation = 3; + * + */ + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotationOrBuilder + getExplicitAnnotationOrBuilder(); + + /** + * + * + *
+   * Object tracking results.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 4; + * + */ + java.util.List + getObjectAnnotationsList(); + /** + * + * + *
+   * Object tracking results.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 4; + * + */ + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation getObjectAnnotations( + int index); + /** + * + * + *
+   * Object tracking results.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 4; + * + */ + int getObjectAnnotationsCount(); + /** + * + * + *
+   * Object tracking results.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 4; + * + */ + java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotationOrBuilder> + getObjectAnnotationsOrBuilderList(); + /** + * + * + *
+   * Object tracking results.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 4; + * + */ + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotationOrBuilder + getObjectAnnotationsOrBuilder(int index); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoConfig.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoConfig.java new file mode 100644 index 000000000000..92be6b93dd0b --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoConfig.java @@ -0,0 +1,2388 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Provides information to the annotator that specifies how to process the
+ * request.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig} + */ +public final class StreamingVideoConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig) + StreamingVideoConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use StreamingVideoConfig.newBuilder() to construct. + private StreamingVideoConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StreamingVideoConfig() { + feature_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StreamingVideoConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + feature_ = rawValue; + break; + } + case 18: + { + com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + .Builder + subBuilder = null; + if (streamingConfigCase_ == 2) { + subBuilder = + ((com.google.cloud.videointelligence.v1p3beta1 + .StreamingShotChangeDetectionConfig) + streamingConfig_) + .toBuilder(); + } + streamingConfig_ = + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1 + .StreamingShotChangeDetectionConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.videointelligence.v1p3beta1 + .StreamingShotChangeDetectionConfig) + streamingConfig_); + streamingConfig_ = subBuilder.buildPartial(); + } + streamingConfigCase_ = 2; + break; + } + case 26: + { + com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig.Builder + subBuilder = null; + if (streamingConfigCase_ == 3) { + subBuilder = + ((com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig) + streamingConfig_) + .toBuilder(); + } + streamingConfig_ = + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig) + streamingConfig_); + streamingConfig_ = subBuilder.buildPartial(); + } + streamingConfigCase_ = 3; + break; + } + case 34: + { + com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + .Builder + subBuilder = null; + if (streamingConfigCase_ == 4) { + subBuilder = + ((com.google.cloud.videointelligence.v1p3beta1 + .StreamingExplicitContentDetectionConfig) + streamingConfig_) + .toBuilder(); + } + streamingConfig_ = + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1 + .StreamingExplicitContentDetectionConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.videointelligence.v1p3beta1 + .StreamingExplicitContentDetectionConfig) + streamingConfig_); + streamingConfig_ = subBuilder.buildPartial(); + } + streamingConfigCase_ = 4; + break; + } + case 42: + { + com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig.Builder + subBuilder = null; + if (streamingConfigCase_ == 5) { + subBuilder = + ((com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig) + streamingConfig_) + .toBuilder(); + } + streamingConfig_ = + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig) + streamingConfig_); + streamingConfig_ = subBuilder.buildPartial(); + } + streamingConfigCase_ = 5; + break; + } + case 242: + { + com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig.Builder + subBuilder = null; + if (storageConfig_ != null) { + subBuilder = storageConfig_.toBuilder(); + } + storageConfig_ = + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(storageConfig_); + storageConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingVideoConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingVideoConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig.class, + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig.Builder.class); + } + + private int streamingConfigCase_ = 0; + private java.lang.Object streamingConfig_; + + public enum StreamingConfigCase implements com.google.protobuf.Internal.EnumLite { + SHOT_CHANGE_DETECTION_CONFIG(2), + LABEL_DETECTION_CONFIG(3), + EXPLICIT_CONTENT_DETECTION_CONFIG(4), + OBJECT_TRACKING_CONFIG(5), + STREAMINGCONFIG_NOT_SET(0); + private final int value; + + private StreamingConfigCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static StreamingConfigCase valueOf(int value) { + return forNumber(value); + } + + public static StreamingConfigCase forNumber(int value) { + switch (value) { + case 2: + return SHOT_CHANGE_DETECTION_CONFIG; + case 3: + return LABEL_DETECTION_CONFIG; + case 4: + return EXPLICIT_CONTENT_DETECTION_CONFIG; + case 5: + return OBJECT_TRACKING_CONFIG; + case 0: + return STREAMINGCONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public StreamingConfigCase getStreamingConfigCase() { + return StreamingConfigCase.forNumber(streamingConfigCase_); + } + + public static final int FEATURE_FIELD_NUMBER = 1; + private int feature_; + /** + * + * + *
+   * Requested annotation feature.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingFeature feature = 1; + */ + public int getFeatureValue() { + return feature_; + } + /** + * + * + *
+   * Requested annotation feature.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingFeature feature = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingFeature getFeature() { + @SuppressWarnings("deprecation") + com.google.cloud.videointelligence.v1p3beta1.StreamingFeature result = + com.google.cloud.videointelligence.v1p3beta1.StreamingFeature.valueOf(feature_); + return result == null + ? com.google.cloud.videointelligence.v1p3beta1.StreamingFeature.UNRECOGNIZED + : result; + } + + public static final int SHOT_CHANGE_DETECTION_CONFIG_FIELD_NUMBER = 2; + /** + * + * + *
+   * Config for SHOT_CHANGE_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig shot_change_detection_config = 2; + * + */ + public boolean hasShotChangeDetectionConfig() { + return streamingConfigCase_ == 2; + } + /** + * + * + *
+   * Config for SHOT_CHANGE_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig shot_change_detection_config = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + getShotChangeDetectionConfig() { + if (streamingConfigCase_ == 2) { + return (com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig) + streamingConfig_; + } + return com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + .getDefaultInstance(); + } + /** + * + * + *
+   * Config for SHOT_CHANGE_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig shot_change_detection_config = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfigOrBuilder + getShotChangeDetectionConfigOrBuilder() { + if (streamingConfigCase_ == 2) { + return (com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig) + streamingConfig_; + } + return com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + .getDefaultInstance(); + } + + public static final int LABEL_DETECTION_CONFIG_FIELD_NUMBER = 3; + /** + * + * + *
+   * Config for LABEL_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig label_detection_config = 3; + * + */ + public boolean hasLabelDetectionConfig() { + return streamingConfigCase_ == 3; + } + /** + * + * + *
+   * Config for LABEL_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig label_detection_config = 3; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig + getLabelDetectionConfig() { + if (streamingConfigCase_ == 3) { + return (com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig) + streamingConfig_; + } + return com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig + .getDefaultInstance(); + } + /** + * + * + *
+   * Config for LABEL_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig label_detection_config = 3; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfigOrBuilder + getLabelDetectionConfigOrBuilder() { + if (streamingConfigCase_ == 3) { + return (com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig) + streamingConfig_; + } + return com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig + .getDefaultInstance(); + } + + public static final int EXPLICIT_CONTENT_DETECTION_CONFIG_FIELD_NUMBER = 4; + /** + * + * + *
+   * Config for STREAMING_EXPLICIT_CONTENT_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig explicit_content_detection_config = 4; + * + */ + public boolean hasExplicitContentDetectionConfig() { + return streamingConfigCase_ == 4; + } + /** + * + * + *
+   * Config for STREAMING_EXPLICIT_CONTENT_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig explicit_content_detection_config = 4; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + getExplicitContentDetectionConfig() { + if (streamingConfigCase_ == 4) { + return (com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig) + streamingConfig_; + } + return com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + .getDefaultInstance(); + } + /** + * + * + *
+   * Config for STREAMING_EXPLICIT_CONTENT_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig explicit_content_detection_config = 4; + * + */ + public com.google.cloud.videointelligence.v1p3beta1 + .StreamingExplicitContentDetectionConfigOrBuilder + getExplicitContentDetectionConfigOrBuilder() { + if (streamingConfigCase_ == 4) { + return (com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig) + streamingConfig_; + } + return com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + .getDefaultInstance(); + } + + public static final int OBJECT_TRACKING_CONFIG_FIELD_NUMBER = 5; + /** + * + * + *
+   * Config for STREAMING_OBJECT_TRACKING.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig object_tracking_config = 5; + * + */ + public boolean hasObjectTrackingConfig() { + return streamingConfigCase_ == 5; + } + /** + * + * + *
+   * Config for STREAMING_OBJECT_TRACKING.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig object_tracking_config = 5; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig + getObjectTrackingConfig() { + if (streamingConfigCase_ == 5) { + return (com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig) + streamingConfig_; + } + return com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig + .getDefaultInstance(); + } + /** + * + * + *
+   * Config for STREAMING_OBJECT_TRACKING.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig object_tracking_config = 5; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfigOrBuilder + getObjectTrackingConfigOrBuilder() { + if (streamingConfigCase_ == 5) { + return (com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig) + streamingConfig_; + } + return com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig + .getDefaultInstance(); + } + + public static final int STORAGE_CONFIG_FIELD_NUMBER = 30; + private com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig storageConfig_; + /** + * + * + *
+   * Streaming storage option. By default: storage is disabled.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig storage_config = 30; + * + */ + public boolean hasStorageConfig() { + return storageConfig_ != null; + } + /** + * + * + *
+   * Streaming storage option. By default: storage is disabled.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig storage_config = 30; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig getStorageConfig() { + return storageConfig_ == null + ? com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig.getDefaultInstance() + : storageConfig_; + } + /** + * + * + *
+   * Streaming storage option. By default: storage is disabled.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig storage_config = 30; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfigOrBuilder + getStorageConfigOrBuilder() { + return getStorageConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (feature_ + != com.google.cloud.videointelligence.v1p3beta1.StreamingFeature + .STREAMING_FEATURE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, feature_); + } + if (streamingConfigCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig) + streamingConfig_); + } + if (streamingConfigCase_ == 3) { + output.writeMessage( + 3, + (com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig) + streamingConfig_); + } + if (streamingConfigCase_ == 4) { + output.writeMessage( + 4, + (com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig) + streamingConfig_); + } + if (streamingConfigCase_ == 5) { + output.writeMessage( + 5, + (com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig) + streamingConfig_); + } + if (storageConfig_ != null) { + output.writeMessage(30, getStorageConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (feature_ + != com.google.cloud.videointelligence.v1p3beta1.StreamingFeature + .STREAMING_FEATURE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, feature_); + } + if (streamingConfigCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig) + streamingConfig_); + } + if (streamingConfigCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig) + streamingConfig_); + } + if (streamingConfigCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, + (com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig) + streamingConfig_); + } + if (streamingConfigCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, + (com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig) + streamingConfig_); + } + if (storageConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(30, getStorageConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig other = + (com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig) obj; + + boolean result = true; + result = result && feature_ == other.feature_; + result = result && (hasStorageConfig() == other.hasStorageConfig()); + if (hasStorageConfig()) { + result = result && getStorageConfig().equals(other.getStorageConfig()); + } + result = result && getStreamingConfigCase().equals(other.getStreamingConfigCase()); + if (!result) return false; + switch (streamingConfigCase_) { + case 2: + result = + result && getShotChangeDetectionConfig().equals(other.getShotChangeDetectionConfig()); + break; + case 3: + result = result && getLabelDetectionConfig().equals(other.getLabelDetectionConfig()); + break; + case 4: + result = + result + && getExplicitContentDetectionConfig() + .equals(other.getExplicitContentDetectionConfig()); + break; + case 5: + result = result && getObjectTrackingConfig().equals(other.getObjectTrackingConfig()); + break; + case 0: + default: + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FEATURE_FIELD_NUMBER; + hash = (53 * hash) + feature_; + if (hasStorageConfig()) { + hash = (37 * hash) + STORAGE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getStorageConfig().hashCode(); + } + switch (streamingConfigCase_) { + case 2: + hash = (37 * hash) + SHOT_CHANGE_DETECTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getShotChangeDetectionConfig().hashCode(); + break; + case 3: + hash = (37 * hash) + LABEL_DETECTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getLabelDetectionConfig().hashCode(); + break; + case 4: + hash = (37 * hash) + EXPLICIT_CONTENT_DETECTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getExplicitContentDetectionConfig().hashCode(); + break; + case 5: + hash = (37 * hash) + OBJECT_TRACKING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getObjectTrackingConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Provides information to the annotator that specifies how to process the
+   * request.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig) + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingVideoConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingVideoConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig.class, + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig.Builder.class); + } + + // Construct using + // com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + feature_ = 0; + + if (storageConfigBuilder_ == null) { + storageConfig_ = null; + } else { + storageConfig_ = null; + storageConfigBuilder_ = null; + } + streamingConfigCase_ = 0; + streamingConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_StreamingVideoConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig + getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig build() { + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig result = + new com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig(this); + result.feature_ = feature_; + if (streamingConfigCase_ == 2) { + if (shotChangeDetectionConfigBuilder_ == null) { + result.streamingConfig_ = streamingConfig_; + } else { + result.streamingConfig_ = shotChangeDetectionConfigBuilder_.build(); + } + } + if (streamingConfigCase_ == 3) { + if (labelDetectionConfigBuilder_ == null) { + result.streamingConfig_ = streamingConfig_; + } else { + result.streamingConfig_ = labelDetectionConfigBuilder_.build(); + } + } + if (streamingConfigCase_ == 4) { + if (explicitContentDetectionConfigBuilder_ == null) { + result.streamingConfig_ = streamingConfig_; + } else { + result.streamingConfig_ = explicitContentDetectionConfigBuilder_.build(); + } + } + if (streamingConfigCase_ == 5) { + if (objectTrackingConfigBuilder_ == null) { + result.streamingConfig_ = streamingConfig_; + } else { + result.streamingConfig_ = objectTrackingConfigBuilder_.build(); + } + } + if (storageConfigBuilder_ == null) { + result.storageConfig_ = storageConfig_; + } else { + result.storageConfig_ = storageConfigBuilder_.build(); + } + result.streamingConfigCase_ = streamingConfigCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig) { + return mergeFrom((com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig other) { + if (other + == com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig.getDefaultInstance()) + return this; + if (other.feature_ != 0) { + setFeatureValue(other.getFeatureValue()); + } + if (other.hasStorageConfig()) { + mergeStorageConfig(other.getStorageConfig()); + } + switch (other.getStreamingConfigCase()) { + case SHOT_CHANGE_DETECTION_CONFIG: + { + mergeShotChangeDetectionConfig(other.getShotChangeDetectionConfig()); + break; + } + case LABEL_DETECTION_CONFIG: + { + mergeLabelDetectionConfig(other.getLabelDetectionConfig()); + break; + } + case EXPLICIT_CONTENT_DETECTION_CONFIG: + { + mergeExplicitContentDetectionConfig(other.getExplicitContentDetectionConfig()); + break; + } + case OBJECT_TRACKING_CONFIG: + { + mergeObjectTrackingConfig(other.getObjectTrackingConfig()); + break; + } + case STREAMINGCONFIG_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int streamingConfigCase_ = 0; + private java.lang.Object streamingConfig_; + + public StreamingConfigCase getStreamingConfigCase() { + return StreamingConfigCase.forNumber(streamingConfigCase_); + } + + public Builder clearStreamingConfig() { + streamingConfigCase_ = 0; + streamingConfig_ = null; + onChanged(); + return this; + } + + private int feature_ = 0; + /** + * + * + *
+     * Requested annotation feature.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingFeature feature = 1; + */ + public int getFeatureValue() { + return feature_; + } + /** + * + * + *
+     * Requested annotation feature.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingFeature feature = 1; + */ + public Builder setFeatureValue(int value) { + feature_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Requested annotation feature.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingFeature feature = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingFeature getFeature() { + @SuppressWarnings("deprecation") + com.google.cloud.videointelligence.v1p3beta1.StreamingFeature result = + com.google.cloud.videointelligence.v1p3beta1.StreamingFeature.valueOf(feature_); + return result == null + ? com.google.cloud.videointelligence.v1p3beta1.StreamingFeature.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Requested annotation feature.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingFeature feature = 1; + */ + public Builder setFeature(com.google.cloud.videointelligence.v1p3beta1.StreamingFeature value) { + if (value == null) { + throw new NullPointerException(); + } + + feature_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Requested annotation feature.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingFeature feature = 1; + */ + public Builder clearFeature() { + + feature_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig, + com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig.Builder, + com.google.cloud.videointelligence.v1p3beta1 + .StreamingShotChangeDetectionConfigOrBuilder> + shotChangeDetectionConfigBuilder_; + /** + * + * + *
+     * Config for SHOT_CHANGE_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig shot_change_detection_config = 2; + * + */ + public boolean hasShotChangeDetectionConfig() { + return streamingConfigCase_ == 2; + } + /** + * + * + *
+     * Config for SHOT_CHANGE_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig shot_change_detection_config = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + getShotChangeDetectionConfig() { + if (shotChangeDetectionConfigBuilder_ == null) { + if (streamingConfigCase_ == 2) { + return (com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig) + streamingConfig_; + } + return com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + .getDefaultInstance(); + } else { + if (streamingConfigCase_ == 2) { + return shotChangeDetectionConfigBuilder_.getMessage(); + } + return com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Config for SHOT_CHANGE_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig shot_change_detection_config = 2; + * + */ + public Builder setShotChangeDetectionConfig( + com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig value) { + if (shotChangeDetectionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + streamingConfig_ = value; + onChanged(); + } else { + shotChangeDetectionConfigBuilder_.setMessage(value); + } + streamingConfigCase_ = 2; + return this; + } + /** + * + * + *
+     * Config for SHOT_CHANGE_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig shot_change_detection_config = 2; + * + */ + public Builder setShotChangeDetectionConfig( + com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig.Builder + builderForValue) { + if (shotChangeDetectionConfigBuilder_ == null) { + streamingConfig_ = builderForValue.build(); + onChanged(); + } else { + shotChangeDetectionConfigBuilder_.setMessage(builderForValue.build()); + } + streamingConfigCase_ = 2; + return this; + } + /** + * + * + *
+     * Config for SHOT_CHANGE_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig shot_change_detection_config = 2; + * + */ + public Builder mergeShotChangeDetectionConfig( + com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig value) { + if (shotChangeDetectionConfigBuilder_ == null) { + if (streamingConfigCase_ == 2 + && streamingConfig_ + != com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + .getDefaultInstance()) { + streamingConfig_ = + com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + .newBuilder( + (com.google.cloud.videointelligence.v1p3beta1 + .StreamingShotChangeDetectionConfig) + streamingConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + streamingConfig_ = value; + } + onChanged(); + } else { + if (streamingConfigCase_ == 2) { + shotChangeDetectionConfigBuilder_.mergeFrom(value); + } + shotChangeDetectionConfigBuilder_.setMessage(value); + } + streamingConfigCase_ = 2; + return this; + } + /** + * + * + *
+     * Config for SHOT_CHANGE_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig shot_change_detection_config = 2; + * + */ + public Builder clearShotChangeDetectionConfig() { + if (shotChangeDetectionConfigBuilder_ == null) { + if (streamingConfigCase_ == 2) { + streamingConfigCase_ = 0; + streamingConfig_ = null; + onChanged(); + } + } else { + if (streamingConfigCase_ == 2) { + streamingConfigCase_ = 0; + streamingConfig_ = null; + } + shotChangeDetectionConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Config for SHOT_CHANGE_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig shot_change_detection_config = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig.Builder + getShotChangeDetectionConfigBuilder() { + return getShotChangeDetectionConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Config for SHOT_CHANGE_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig shot_change_detection_config = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfigOrBuilder + getShotChangeDetectionConfigOrBuilder() { + if ((streamingConfigCase_ == 2) && (shotChangeDetectionConfigBuilder_ != null)) { + return shotChangeDetectionConfigBuilder_.getMessageOrBuilder(); + } else { + if (streamingConfigCase_ == 2) { + return (com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig) + streamingConfig_; + } + return com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Config for SHOT_CHANGE_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig shot_change_detection_config = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig, + com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig.Builder, + com.google.cloud.videointelligence.v1p3beta1 + .StreamingShotChangeDetectionConfigOrBuilder> + getShotChangeDetectionConfigFieldBuilder() { + if (shotChangeDetectionConfigBuilder_ == null) { + if (!(streamingConfigCase_ == 2)) { + streamingConfig_ = + com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + .getDefaultInstance(); + } + shotChangeDetectionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig, + com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + .Builder, + com.google.cloud.videointelligence.v1p3beta1 + .StreamingShotChangeDetectionConfigOrBuilder>( + (com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig) + streamingConfig_, + getParentForChildren(), + isClean()); + streamingConfig_ = null; + } + streamingConfigCase_ = 2; + onChanged(); + ; + return shotChangeDetectionConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig, + com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig.Builder, + com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfigOrBuilder> + labelDetectionConfigBuilder_; + /** + * + * + *
+     * Config for LABEL_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig label_detection_config = 3; + * + */ + public boolean hasLabelDetectionConfig() { + return streamingConfigCase_ == 3; + } + /** + * + * + *
+     * Config for LABEL_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig label_detection_config = 3; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig + getLabelDetectionConfig() { + if (labelDetectionConfigBuilder_ == null) { + if (streamingConfigCase_ == 3) { + return (com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig) + streamingConfig_; + } + return com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig + .getDefaultInstance(); + } else { + if (streamingConfigCase_ == 3) { + return labelDetectionConfigBuilder_.getMessage(); + } + return com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Config for LABEL_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig label_detection_config = 3; + * + */ + public Builder setLabelDetectionConfig( + com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig value) { + if (labelDetectionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + streamingConfig_ = value; + onChanged(); + } else { + labelDetectionConfigBuilder_.setMessage(value); + } + streamingConfigCase_ = 3; + return this; + } + /** + * + * + *
+     * Config for LABEL_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig label_detection_config = 3; + * + */ + public Builder setLabelDetectionConfig( + com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig.Builder + builderForValue) { + if (labelDetectionConfigBuilder_ == null) { + streamingConfig_ = builderForValue.build(); + onChanged(); + } else { + labelDetectionConfigBuilder_.setMessage(builderForValue.build()); + } + streamingConfigCase_ = 3; + return this; + } + /** + * + * + *
+     * Config for LABEL_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig label_detection_config = 3; + * + */ + public Builder mergeLabelDetectionConfig( + com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig value) { + if (labelDetectionConfigBuilder_ == null) { + if (streamingConfigCase_ == 3 + && streamingConfig_ + != com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig + .getDefaultInstance()) { + streamingConfig_ = + com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig.newBuilder( + (com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig) + streamingConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + streamingConfig_ = value; + } + onChanged(); + } else { + if (streamingConfigCase_ == 3) { + labelDetectionConfigBuilder_.mergeFrom(value); + } + labelDetectionConfigBuilder_.setMessage(value); + } + streamingConfigCase_ = 3; + return this; + } + /** + * + * + *
+     * Config for LABEL_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig label_detection_config = 3; + * + */ + public Builder clearLabelDetectionConfig() { + if (labelDetectionConfigBuilder_ == null) { + if (streamingConfigCase_ == 3) { + streamingConfigCase_ = 0; + streamingConfig_ = null; + onChanged(); + } + } else { + if (streamingConfigCase_ == 3) { + streamingConfigCase_ = 0; + streamingConfig_ = null; + } + labelDetectionConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Config for LABEL_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig label_detection_config = 3; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig.Builder + getLabelDetectionConfigBuilder() { + return getLabelDetectionConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Config for LABEL_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig label_detection_config = 3; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfigOrBuilder + getLabelDetectionConfigOrBuilder() { + if ((streamingConfigCase_ == 3) && (labelDetectionConfigBuilder_ != null)) { + return labelDetectionConfigBuilder_.getMessageOrBuilder(); + } else { + if (streamingConfigCase_ == 3) { + return (com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig) + streamingConfig_; + } + return com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Config for LABEL_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig label_detection_config = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig, + com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig.Builder, + com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfigOrBuilder> + getLabelDetectionConfigFieldBuilder() { + if (labelDetectionConfigBuilder_ == null) { + if (!(streamingConfigCase_ == 3)) { + streamingConfig_ = + com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig + .getDefaultInstance(); + } + labelDetectionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig, + com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig.Builder, + com.google.cloud.videointelligence.v1p3beta1 + .StreamingLabelDetectionConfigOrBuilder>( + (com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig) + streamingConfig_, + getParentForChildren(), + isClean()); + streamingConfig_ = null; + } + streamingConfigCase_ = 3; + onChanged(); + ; + return labelDetectionConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig, + com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + .Builder, + com.google.cloud.videointelligence.v1p3beta1 + .StreamingExplicitContentDetectionConfigOrBuilder> + explicitContentDetectionConfigBuilder_; + /** + * + * + *
+     * Config for STREAMING_EXPLICIT_CONTENT_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig explicit_content_detection_config = 4; + * + */ + public boolean hasExplicitContentDetectionConfig() { + return streamingConfigCase_ == 4; + } + /** + * + * + *
+     * Config for STREAMING_EXPLICIT_CONTENT_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig explicit_content_detection_config = 4; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + getExplicitContentDetectionConfig() { + if (explicitContentDetectionConfigBuilder_ == null) { + if (streamingConfigCase_ == 4) { + return (com.google.cloud.videointelligence.v1p3beta1 + .StreamingExplicitContentDetectionConfig) + streamingConfig_; + } + return com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + .getDefaultInstance(); + } else { + if (streamingConfigCase_ == 4) { + return explicitContentDetectionConfigBuilder_.getMessage(); + } + return com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Config for STREAMING_EXPLICIT_CONTENT_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig explicit_content_detection_config = 4; + * + */ + public Builder setExplicitContentDetectionConfig( + com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + value) { + if (explicitContentDetectionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + streamingConfig_ = value; + onChanged(); + } else { + explicitContentDetectionConfigBuilder_.setMessage(value); + } + streamingConfigCase_ = 4; + return this; + } + /** + * + * + *
+     * Config for STREAMING_EXPLICIT_CONTENT_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig explicit_content_detection_config = 4; + * + */ + public Builder setExplicitContentDetectionConfig( + com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig.Builder + builderForValue) { + if (explicitContentDetectionConfigBuilder_ == null) { + streamingConfig_ = builderForValue.build(); + onChanged(); + } else { + explicitContentDetectionConfigBuilder_.setMessage(builderForValue.build()); + } + streamingConfigCase_ = 4; + return this; + } + /** + * + * + *
+     * Config for STREAMING_EXPLICIT_CONTENT_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig explicit_content_detection_config = 4; + * + */ + public Builder mergeExplicitContentDetectionConfig( + com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + value) { + if (explicitContentDetectionConfigBuilder_ == null) { + if (streamingConfigCase_ == 4 + && streamingConfig_ + != com.google.cloud.videointelligence.v1p3beta1 + .StreamingExplicitContentDetectionConfig.getDefaultInstance()) { + streamingConfig_ = + com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + .newBuilder( + (com.google.cloud.videointelligence.v1p3beta1 + .StreamingExplicitContentDetectionConfig) + streamingConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + streamingConfig_ = value; + } + onChanged(); + } else { + if (streamingConfigCase_ == 4) { + explicitContentDetectionConfigBuilder_.mergeFrom(value); + } + explicitContentDetectionConfigBuilder_.setMessage(value); + } + streamingConfigCase_ = 4; + return this; + } + /** + * + * + *
+     * Config for STREAMING_EXPLICIT_CONTENT_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig explicit_content_detection_config = 4; + * + */ + public Builder clearExplicitContentDetectionConfig() { + if (explicitContentDetectionConfigBuilder_ == null) { + if (streamingConfigCase_ == 4) { + streamingConfigCase_ = 0; + streamingConfig_ = null; + onChanged(); + } + } else { + if (streamingConfigCase_ == 4) { + streamingConfigCase_ = 0; + streamingConfig_ = null; + } + explicitContentDetectionConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Config for STREAMING_EXPLICIT_CONTENT_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig explicit_content_detection_config = 4; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + .Builder + getExplicitContentDetectionConfigBuilder() { + return getExplicitContentDetectionConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Config for STREAMING_EXPLICIT_CONTENT_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig explicit_content_detection_config = 4; + * + */ + public com.google.cloud.videointelligence.v1p3beta1 + .StreamingExplicitContentDetectionConfigOrBuilder + getExplicitContentDetectionConfigOrBuilder() { + if ((streamingConfigCase_ == 4) && (explicitContentDetectionConfigBuilder_ != null)) { + return explicitContentDetectionConfigBuilder_.getMessageOrBuilder(); + } else { + if (streamingConfigCase_ == 4) { + return (com.google.cloud.videointelligence.v1p3beta1 + .StreamingExplicitContentDetectionConfig) + streamingConfig_; + } + return com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Config for STREAMING_EXPLICIT_CONTENT_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig explicit_content_detection_config = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig, + com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + .Builder, + com.google.cloud.videointelligence.v1p3beta1 + .StreamingExplicitContentDetectionConfigOrBuilder> + getExplicitContentDetectionConfigFieldBuilder() { + if (explicitContentDetectionConfigBuilder_ == null) { + if (!(streamingConfigCase_ == 4)) { + streamingConfig_ = + com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + .getDefaultInstance(); + } + explicitContentDetectionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1 + .StreamingExplicitContentDetectionConfig, + com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + .Builder, + com.google.cloud.videointelligence.v1p3beta1 + .StreamingExplicitContentDetectionConfigOrBuilder>( + (com.google.cloud.videointelligence.v1p3beta1 + .StreamingExplicitContentDetectionConfig) + streamingConfig_, + getParentForChildren(), + isClean()); + streamingConfig_ = null; + } + streamingConfigCase_ = 4; + onChanged(); + ; + return explicitContentDetectionConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig, + com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig.Builder, + com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfigOrBuilder> + objectTrackingConfigBuilder_; + /** + * + * + *
+     * Config for STREAMING_OBJECT_TRACKING.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig object_tracking_config = 5; + * + */ + public boolean hasObjectTrackingConfig() { + return streamingConfigCase_ == 5; + } + /** + * + * + *
+     * Config for STREAMING_OBJECT_TRACKING.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig object_tracking_config = 5; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig + getObjectTrackingConfig() { + if (objectTrackingConfigBuilder_ == null) { + if (streamingConfigCase_ == 5) { + return (com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig) + streamingConfig_; + } + return com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig + .getDefaultInstance(); + } else { + if (streamingConfigCase_ == 5) { + return objectTrackingConfigBuilder_.getMessage(); + } + return com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Config for STREAMING_OBJECT_TRACKING.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig object_tracking_config = 5; + * + */ + public Builder setObjectTrackingConfig( + com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig value) { + if (objectTrackingConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + streamingConfig_ = value; + onChanged(); + } else { + objectTrackingConfigBuilder_.setMessage(value); + } + streamingConfigCase_ = 5; + return this; + } + /** + * + * + *
+     * Config for STREAMING_OBJECT_TRACKING.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig object_tracking_config = 5; + * + */ + public Builder setObjectTrackingConfig( + com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig.Builder + builderForValue) { + if (objectTrackingConfigBuilder_ == null) { + streamingConfig_ = builderForValue.build(); + onChanged(); + } else { + objectTrackingConfigBuilder_.setMessage(builderForValue.build()); + } + streamingConfigCase_ = 5; + return this; + } + /** + * + * + *
+     * Config for STREAMING_OBJECT_TRACKING.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig object_tracking_config = 5; + * + */ + public Builder mergeObjectTrackingConfig( + com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig value) { + if (objectTrackingConfigBuilder_ == null) { + if (streamingConfigCase_ == 5 + && streamingConfig_ + != com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig + .getDefaultInstance()) { + streamingConfig_ = + com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig.newBuilder( + (com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig) + streamingConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + streamingConfig_ = value; + } + onChanged(); + } else { + if (streamingConfigCase_ == 5) { + objectTrackingConfigBuilder_.mergeFrom(value); + } + objectTrackingConfigBuilder_.setMessage(value); + } + streamingConfigCase_ = 5; + return this; + } + /** + * + * + *
+     * Config for STREAMING_OBJECT_TRACKING.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig object_tracking_config = 5; + * + */ + public Builder clearObjectTrackingConfig() { + if (objectTrackingConfigBuilder_ == null) { + if (streamingConfigCase_ == 5) { + streamingConfigCase_ = 0; + streamingConfig_ = null; + onChanged(); + } + } else { + if (streamingConfigCase_ == 5) { + streamingConfigCase_ = 0; + streamingConfig_ = null; + } + objectTrackingConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Config for STREAMING_OBJECT_TRACKING.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig object_tracking_config = 5; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig.Builder + getObjectTrackingConfigBuilder() { + return getObjectTrackingConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Config for STREAMING_OBJECT_TRACKING.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig object_tracking_config = 5; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfigOrBuilder + getObjectTrackingConfigOrBuilder() { + if ((streamingConfigCase_ == 5) && (objectTrackingConfigBuilder_ != null)) { + return objectTrackingConfigBuilder_.getMessageOrBuilder(); + } else { + if (streamingConfigCase_ == 5) { + return (com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig) + streamingConfig_; + } + return com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Config for STREAMING_OBJECT_TRACKING.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig object_tracking_config = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig, + com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig.Builder, + com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfigOrBuilder> + getObjectTrackingConfigFieldBuilder() { + if (objectTrackingConfigBuilder_ == null) { + if (!(streamingConfigCase_ == 5)) { + streamingConfig_ = + com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig + .getDefaultInstance(); + } + objectTrackingConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig, + com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig.Builder, + com.google.cloud.videointelligence.v1p3beta1 + .StreamingObjectTrackingConfigOrBuilder>( + (com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig) + streamingConfig_, + getParentForChildren(), + isClean()); + streamingConfig_ = null; + } + streamingConfigCase_ = 5; + onChanged(); + ; + return objectTrackingConfigBuilder_; + } + + private com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig storageConfig_ = + null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig, + com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig.Builder, + com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfigOrBuilder> + storageConfigBuilder_; + /** + * + * + *
+     * Streaming storage option. By default: storage is disabled.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig storage_config = 30; + * + */ + public boolean hasStorageConfig() { + return storageConfigBuilder_ != null || storageConfig_ != null; + } + /** + * + * + *
+     * Streaming storage option. By default: storage is disabled.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig storage_config = 30; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig getStorageConfig() { + if (storageConfigBuilder_ == null) { + return storageConfig_ == null + ? com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig + .getDefaultInstance() + : storageConfig_; + } else { + return storageConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Streaming storage option. By default: storage is disabled.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig storage_config = 30; + * + */ + public Builder setStorageConfig( + com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig value) { + if (storageConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + storageConfig_ = value; + onChanged(); + } else { + storageConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Streaming storage option. By default: storage is disabled.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig storage_config = 30; + * + */ + public Builder setStorageConfig( + com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig.Builder + builderForValue) { + if (storageConfigBuilder_ == null) { + storageConfig_ = builderForValue.build(); + onChanged(); + } else { + storageConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Streaming storage option. By default: storage is disabled.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig storage_config = 30; + * + */ + public Builder mergeStorageConfig( + com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig value) { + if (storageConfigBuilder_ == null) { + if (storageConfig_ != null) { + storageConfig_ = + com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig.newBuilder( + storageConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + storageConfig_ = value; + } + onChanged(); + } else { + storageConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Streaming storage option. By default: storage is disabled.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig storage_config = 30; + * + */ + public Builder clearStorageConfig() { + if (storageConfigBuilder_ == null) { + storageConfig_ = null; + onChanged(); + } else { + storageConfig_ = null; + storageConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Streaming storage option. By default: storage is disabled.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig storage_config = 30; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig.Builder + getStorageConfigBuilder() { + + onChanged(); + return getStorageConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Streaming storage option. By default: storage is disabled.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig storage_config = 30; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfigOrBuilder + getStorageConfigOrBuilder() { + if (storageConfigBuilder_ != null) { + return storageConfigBuilder_.getMessageOrBuilder(); + } else { + return storageConfig_ == null + ? com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig + .getDefaultInstance() + : storageConfig_; + } + } + /** + * + * + *
+     * Streaming storage option. By default: storage is disabled.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig storage_config = 30; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig, + com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig.Builder, + com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfigOrBuilder> + getStorageConfigFieldBuilder() { + if (storageConfigBuilder_ == null) { + storageConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig, + com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig.Builder, + com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfigOrBuilder>( + getStorageConfig(), getParentForChildren(), isClean()); + storageConfig_ = null; + } + return storageConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig) + private static final com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StreamingVideoConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StreamingVideoConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoConfigOrBuilder.java new file mode 100644 index 000000000000..a8e7792a5edf --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoConfigOrBuilder.java @@ -0,0 +1,225 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface StreamingVideoConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Requested annotation feature.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingFeature feature = 1; + */ + int getFeatureValue(); + /** + * + * + *
+   * Requested annotation feature.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingFeature feature = 1; + */ + com.google.cloud.videointelligence.v1p3beta1.StreamingFeature getFeature(); + + /** + * + * + *
+   * Config for SHOT_CHANGE_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig shot_change_detection_config = 2; + * + */ + boolean hasShotChangeDetectionConfig(); + /** + * + * + *
+   * Config for SHOT_CHANGE_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig shot_change_detection_config = 2; + * + */ + com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig + getShotChangeDetectionConfig(); + /** + * + * + *
+   * Config for SHOT_CHANGE_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig shot_change_detection_config = 2; + * + */ + com.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfigOrBuilder + getShotChangeDetectionConfigOrBuilder(); + + /** + * + * + *
+   * Config for LABEL_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig label_detection_config = 3; + * + */ + boolean hasLabelDetectionConfig(); + /** + * + * + *
+   * Config for LABEL_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig label_detection_config = 3; + * + */ + com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig + getLabelDetectionConfig(); + /** + * + * + *
+   * Config for LABEL_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig label_detection_config = 3; + * + */ + com.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfigOrBuilder + getLabelDetectionConfigOrBuilder(); + + /** + * + * + *
+   * Config for STREAMING_EXPLICIT_CONTENT_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig explicit_content_detection_config = 4; + * + */ + boolean hasExplicitContentDetectionConfig(); + /** + * + * + *
+   * Config for STREAMING_EXPLICIT_CONTENT_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig explicit_content_detection_config = 4; + * + */ + com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig + getExplicitContentDetectionConfig(); + /** + * + * + *
+   * Config for STREAMING_EXPLICIT_CONTENT_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig explicit_content_detection_config = 4; + * + */ + com.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfigOrBuilder + getExplicitContentDetectionConfigOrBuilder(); + + /** + * + * + *
+   * Config for STREAMING_OBJECT_TRACKING.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig object_tracking_config = 5; + * + */ + boolean hasObjectTrackingConfig(); + /** + * + * + *
+   * Config for STREAMING_OBJECT_TRACKING.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig object_tracking_config = 5; + * + */ + com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig + getObjectTrackingConfig(); + /** + * + * + *
+   * Config for STREAMING_OBJECT_TRACKING.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig object_tracking_config = 5; + * + */ + com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfigOrBuilder + getObjectTrackingConfigOrBuilder(); + + /** + * + * + *
+   * Streaming storage option. By default: storage is disabled.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig storage_config = 30; + * + */ + boolean hasStorageConfig(); + /** + * + * + *
+   * Streaming storage option. By default: storage is disabled.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig storage_config = 30; + * + */ + com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig getStorageConfig(); + /** + * + * + *
+   * Streaming storage option. By default: storage is disabled.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig storage_config = 30; + * + */ + com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfigOrBuilder + getStorageConfigOrBuilder(); + + public com.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig.StreamingConfigCase + getStreamingConfigCase(); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextAnnotation.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextAnnotation.java new file mode 100644 index 000000000000..a9097a4ed6a8 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextAnnotation.java @@ -0,0 +1,1116 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Annotations related to one detected OCR text snippet. This will contain the
+ * corresponding text, confidence value, and frame level information for each
+ * detection.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.TextAnnotation} + */ +public final class TextAnnotation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.TextAnnotation) + TextAnnotationOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextAnnotation.newBuilder() to construct. + private TextAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TextAnnotation() { + text_ = ""; + segments_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TextAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + text_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + segments_ = + new java.util.ArrayList< + com.google.cloud.videointelligence.v1p3beta1.TextSegment>(); + mutable_bitField0_ |= 0x00000002; + } + segments_.add( + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.TextSegment.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + segments_ = java.util.Collections.unmodifiableList(segments_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_TextAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_TextAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.TextAnnotation.class, + com.google.cloud.videointelligence.v1p3beta1.TextAnnotation.Builder.class); + } + + private int bitField0_; + public static final int TEXT_FIELD_NUMBER = 1; + private volatile java.lang.Object text_; + /** + * + * + *
+   * The detected text.
+   * 
+ * + * string text = 1; + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } + } + /** + * + * + *
+   * The detected text.
+   * 
+ * + * string text = 1; + */ + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SEGMENTS_FIELD_NUMBER = 2; + private java.util.List segments_; + /** + * + * + *
+   * All video segments where OCR detected text appears.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextSegment segments = 2; + */ + public java.util.List + getSegmentsList() { + return segments_; + } + /** + * + * + *
+   * All video segments where OCR detected text appears.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextSegment segments = 2; + */ + public java.util.List + getSegmentsOrBuilderList() { + return segments_; + } + /** + * + * + *
+   * All video segments where OCR detected text appears.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextSegment segments = 2; + */ + public int getSegmentsCount() { + return segments_.size(); + } + /** + * + * + *
+   * All video segments where OCR detected text appears.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextSegment segments = 2; + */ + public com.google.cloud.videointelligence.v1p3beta1.TextSegment getSegments(int index) { + return segments_.get(index); + } + /** + * + * + *
+   * All video segments where OCR detected text appears.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextSegment segments = 2; + */ + public com.google.cloud.videointelligence.v1p3beta1.TextSegmentOrBuilder getSegmentsOrBuilder( + int index) { + return segments_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getTextBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_); + } + for (int i = 0; i < segments_.size(); i++) { + output.writeMessage(2, segments_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getTextBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, text_); + } + for (int i = 0; i < segments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, segments_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.videointelligence.v1p3beta1.TextAnnotation)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.TextAnnotation other = + (com.google.cloud.videointelligence.v1p3beta1.TextAnnotation) obj; + + boolean result = true; + result = result && getText().equals(other.getText()); + result = result && getSegmentsList().equals(other.getSegmentsList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + if (getSegmentsCount() > 0) { + hash = (37 * hash) + SEGMENTS_FIELD_NUMBER; + hash = (53 * hash) + getSegmentsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextAnnotation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextAnnotation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextAnnotation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextAnnotation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextAnnotation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextAnnotation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextAnnotation parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.TextAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Annotations related to one detected OCR text snippet. This will contain the
+   * corresponding text, confidence value, and frame level information for each
+   * detection.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.TextAnnotation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.TextAnnotation) + com.google.cloud.videointelligence.v1p3beta1.TextAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_TextAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_TextAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.TextAnnotation.class, + com.google.cloud.videointelligence.v1p3beta1.TextAnnotation.Builder.class); + } + + // Construct using com.google.cloud.videointelligence.v1p3beta1.TextAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSegmentsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + text_ = ""; + + if (segmentsBuilder_ == null) { + segments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + segmentsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_TextAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.TextAnnotation getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.TextAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.TextAnnotation build() { + com.google.cloud.videointelligence.v1p3beta1.TextAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.TextAnnotation buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.TextAnnotation result = + new com.google.cloud.videointelligence.v1p3beta1.TextAnnotation(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.text_ = text_; + if (segmentsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + segments_ = java.util.Collections.unmodifiableList(segments_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.segments_ = segments_; + } else { + result.segments_ = segmentsBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.videointelligence.v1p3beta1.TextAnnotation) { + return mergeFrom((com.google.cloud.videointelligence.v1p3beta1.TextAnnotation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.videointelligence.v1p3beta1.TextAnnotation other) { + if (other == com.google.cloud.videointelligence.v1p3beta1.TextAnnotation.getDefaultInstance()) + return this; + if (!other.getText().isEmpty()) { + text_ = other.text_; + onChanged(); + } + if (segmentsBuilder_ == null) { + if (!other.segments_.isEmpty()) { + if (segments_.isEmpty()) { + segments_ = other.segments_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSegmentsIsMutable(); + segments_.addAll(other.segments_); + } + onChanged(); + } + } else { + if (!other.segments_.isEmpty()) { + if (segmentsBuilder_.isEmpty()) { + segmentsBuilder_.dispose(); + segmentsBuilder_ = null; + segments_ = other.segments_; + bitField0_ = (bitField0_ & ~0x00000002); + segmentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSegmentsFieldBuilder() + : null; + } else { + segmentsBuilder_.addAllMessages(other.segments_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.TextAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.TextAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object text_ = ""; + /** + * + * + *
+     * The detected text.
+     * 
+ * + * string text = 1; + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The detected text.
+     * 
+ * + * string text = 1; + */ + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The detected text.
+     * 
+ * + * string text = 1; + */ + public Builder setText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + text_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The detected text.
+     * 
+ * + * string text = 1; + */ + public Builder clearText() { + + text_ = getDefaultInstance().getText(); + onChanged(); + return this; + } + /** + * + * + *
+     * The detected text.
+     * 
+ * + * string text = 1; + */ + public Builder setTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + text_ = value; + onChanged(); + return this; + } + + private java.util.List segments_ = + java.util.Collections.emptyList(); + + private void ensureSegmentsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + segments_ = + new java.util.ArrayList( + segments_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.TextSegment, + com.google.cloud.videointelligence.v1p3beta1.TextSegment.Builder, + com.google.cloud.videointelligence.v1p3beta1.TextSegmentOrBuilder> + segmentsBuilder_; + + /** + * + * + *
+     * All video segments where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextSegment segments = 2; + */ + public java.util.List + getSegmentsList() { + if (segmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(segments_); + } else { + return segmentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * All video segments where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextSegment segments = 2; + */ + public int getSegmentsCount() { + if (segmentsBuilder_ == null) { + return segments_.size(); + } else { + return segmentsBuilder_.getCount(); + } + } + /** + * + * + *
+     * All video segments where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextSegment segments = 2; + */ + public com.google.cloud.videointelligence.v1p3beta1.TextSegment getSegments(int index) { + if (segmentsBuilder_ == null) { + return segments_.get(index); + } else { + return segmentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * All video segments where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextSegment segments = 2; + */ + public Builder setSegments( + int index, com.google.cloud.videointelligence.v1p3beta1.TextSegment value) { + if (segmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSegmentsIsMutable(); + segments_.set(index, value); + onChanged(); + } else { + segmentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * All video segments where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextSegment segments = 2; + */ + public Builder setSegments( + int index, + com.google.cloud.videointelligence.v1p3beta1.TextSegment.Builder builderForValue) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.set(index, builderForValue.build()); + onChanged(); + } else { + segmentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All video segments where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextSegment segments = 2; + */ + public Builder addSegments(com.google.cloud.videointelligence.v1p3beta1.TextSegment value) { + if (segmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSegmentsIsMutable(); + segments_.add(value); + onChanged(); + } else { + segmentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * All video segments where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextSegment segments = 2; + */ + public Builder addSegments( + int index, com.google.cloud.videointelligence.v1p3beta1.TextSegment value) { + if (segmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSegmentsIsMutable(); + segments_.add(index, value); + onChanged(); + } else { + segmentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * All video segments where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextSegment segments = 2; + */ + public Builder addSegments( + com.google.cloud.videointelligence.v1p3beta1.TextSegment.Builder builderForValue) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.add(builderForValue.build()); + onChanged(); + } else { + segmentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All video segments where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextSegment segments = 2; + */ + public Builder addSegments( + int index, + com.google.cloud.videointelligence.v1p3beta1.TextSegment.Builder builderForValue) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.add(index, builderForValue.build()); + onChanged(); + } else { + segmentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All video segments where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextSegment segments = 2; + */ + public Builder addAllSegments( + java.lang.Iterable + values) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, segments_); + onChanged(); + } else { + segmentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * All video segments where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextSegment segments = 2; + */ + public Builder clearSegments() { + if (segmentsBuilder_ == null) { + segments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + segmentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * All video segments where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextSegment segments = 2; + */ + public Builder removeSegments(int index) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.remove(index); + onChanged(); + } else { + segmentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * All video segments where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextSegment segments = 2; + */ + public com.google.cloud.videointelligence.v1p3beta1.TextSegment.Builder getSegmentsBuilder( + int index) { + return getSegmentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * All video segments where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextSegment segments = 2; + */ + public com.google.cloud.videointelligence.v1p3beta1.TextSegmentOrBuilder getSegmentsOrBuilder( + int index) { + if (segmentsBuilder_ == null) { + return segments_.get(index); + } else { + return segmentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * All video segments where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextSegment segments = 2; + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.TextSegmentOrBuilder> + getSegmentsOrBuilderList() { + if (segmentsBuilder_ != null) { + return segmentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(segments_); + } + } + /** + * + * + *
+     * All video segments where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextSegment segments = 2; + */ + public com.google.cloud.videointelligence.v1p3beta1.TextSegment.Builder addSegmentsBuilder() { + return getSegmentsFieldBuilder() + .addBuilder( + com.google.cloud.videointelligence.v1p3beta1.TextSegment.getDefaultInstance()); + } + /** + * + * + *
+     * All video segments where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextSegment segments = 2; + */ + public com.google.cloud.videointelligence.v1p3beta1.TextSegment.Builder addSegmentsBuilder( + int index) { + return getSegmentsFieldBuilder() + .addBuilder( + index, com.google.cloud.videointelligence.v1p3beta1.TextSegment.getDefaultInstance()); + } + /** + * + * + *
+     * All video segments where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextSegment segments = 2; + */ + public java.util.List + getSegmentsBuilderList() { + return getSegmentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.TextSegment, + com.google.cloud.videointelligence.v1p3beta1.TextSegment.Builder, + com.google.cloud.videointelligence.v1p3beta1.TextSegmentOrBuilder> + getSegmentsFieldBuilder() { + if (segmentsBuilder_ == null) { + segmentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.TextSegment, + com.google.cloud.videointelligence.v1p3beta1.TextSegment.Builder, + com.google.cloud.videointelligence.v1p3beta1.TextSegmentOrBuilder>( + segments_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + segments_ = null; + } + return segmentsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.TextAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.TextAnnotation) + private static final com.google.cloud.videointelligence.v1p3beta1.TextAnnotation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.videointelligence.v1p3beta1.TextAnnotation(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.TextAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextAnnotationOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextAnnotationOrBuilder.java new file mode 100644 index 000000000000..2d92facb55bf --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextAnnotationOrBuilder.java @@ -0,0 +1,83 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface TextAnnotationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.TextAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The detected text.
+   * 
+ * + * string text = 1; + */ + java.lang.String getText(); + /** + * + * + *
+   * The detected text.
+   * 
+ * + * string text = 1; + */ + com.google.protobuf.ByteString getTextBytes(); + + /** + * + * + *
+   * All video segments where OCR detected text appears.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextSegment segments = 2; + */ + java.util.List getSegmentsList(); + /** + * + * + *
+   * All video segments where OCR detected text appears.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextSegment segments = 2; + */ + com.google.cloud.videointelligence.v1p3beta1.TextSegment getSegments(int index); + /** + * + * + *
+   * All video segments where OCR detected text appears.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextSegment segments = 2; + */ + int getSegmentsCount(); + /** + * + * + *
+   * All video segments where OCR detected text appears.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextSegment segments = 2; + */ + java.util.List + getSegmentsOrBuilderList(); + /** + * + * + *
+   * All video segments where OCR detected text appears.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextSegment segments = 2; + */ + com.google.cloud.videointelligence.v1p3beta1.TextSegmentOrBuilder getSegmentsOrBuilder(int index); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextDetectionConfig.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextDetectionConfig.java new file mode 100644 index 000000000000..c34fb19b4410 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextDetectionConfig.java @@ -0,0 +1,729 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Config for TEXT_DETECTION.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.TextDetectionConfig} + */ +public final class TextDetectionConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.TextDetectionConfig) + TextDetectionConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextDetectionConfig.newBuilder() to construct. + private TextDetectionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TextDetectionConfig() { + languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TextDetectionConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + languageHints_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + languageHints_.add(s); + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + languageHints_ = languageHints_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_TextDetectionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_TextDetectionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig.class, + com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig.Builder.class); + } + + public static final int LANGUAGE_HINTS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList languageHints_; + /** + * + * + *
+   * Language hint can be specified if the language to be detected is known a
+   * priori. It can increase the accuracy of the detection. Language hint must
+   * be language code in BCP-47 format.
+   * Automatic language detection is performed if no hint is provided.
+   * 
+ * + * repeated string language_hints = 1; + */ + public com.google.protobuf.ProtocolStringList getLanguageHintsList() { + return languageHints_; + } + /** + * + * + *
+   * Language hint can be specified if the language to be detected is known a
+   * priori. It can increase the accuracy of the detection. Language hint must
+   * be language code in BCP-47 format.
+   * Automatic language detection is performed if no hint is provided.
+   * 
+ * + * repeated string language_hints = 1; + */ + public int getLanguageHintsCount() { + return languageHints_.size(); + } + /** + * + * + *
+   * Language hint can be specified if the language to be detected is known a
+   * priori. It can increase the accuracy of the detection. Language hint must
+   * be language code in BCP-47 format.
+   * Automatic language detection is performed if no hint is provided.
+   * 
+ * + * repeated string language_hints = 1; + */ + public java.lang.String getLanguageHints(int index) { + return languageHints_.get(index); + } + /** + * + * + *
+   * Language hint can be specified if the language to be detected is known a
+   * priori. It can increase the accuracy of the detection. Language hint must
+   * be language code in BCP-47 format.
+   * Automatic language detection is performed if no hint is provided.
+   * 
+ * + * repeated string language_hints = 1; + */ + public com.google.protobuf.ByteString getLanguageHintsBytes(int index) { + return languageHints_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < languageHints_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageHints_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < languageHints_.size(); i++) { + dataSize += computeStringSizeNoTag(languageHints_.getRaw(i)); + } + size += dataSize; + size += 1 * getLanguageHintsList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig other = + (com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig) obj; + + boolean result = true; + result = result && getLanguageHintsList().equals(other.getLanguageHintsList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getLanguageHintsCount() > 0) { + hash = (37 * hash) + LANGUAGE_HINTS_FIELD_NUMBER; + hash = (53 * hash) + getLanguageHintsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Config for TEXT_DETECTION.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.TextDetectionConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.TextDetectionConfig) + com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_TextDetectionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_TextDetectionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig.class, + com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig.Builder.class); + } + + // Construct using com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_TextDetectionConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig + getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig build() { + com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig result = + new com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + languageHints_ = languageHints_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.languageHints_ = languageHints_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig) { + return mergeFrom((com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig other) { + if (other + == com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig.getDefaultInstance()) + return this; + if (!other.languageHints_.isEmpty()) { + if (languageHints_.isEmpty()) { + languageHints_ = other.languageHints_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLanguageHintsIsMutable(); + languageHints_.addAll(other.languageHints_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList languageHints_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureLanguageHintsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + languageHints_ = new com.google.protobuf.LazyStringArrayList(languageHints_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Language hint can be specified if the language to be detected is known a
+     * priori. It can increase the accuracy of the detection. Language hint must
+     * be language code in BCP-47 format.
+     * Automatic language detection is performed if no hint is provided.
+     * 
+ * + * repeated string language_hints = 1; + */ + public com.google.protobuf.ProtocolStringList getLanguageHintsList() { + return languageHints_.getUnmodifiableView(); + } + /** + * + * + *
+     * Language hint can be specified if the language to be detected is known a
+     * priori. It can increase the accuracy of the detection. Language hint must
+     * be language code in BCP-47 format.
+     * Automatic language detection is performed if no hint is provided.
+     * 
+ * + * repeated string language_hints = 1; + */ + public int getLanguageHintsCount() { + return languageHints_.size(); + } + /** + * + * + *
+     * Language hint can be specified if the language to be detected is known a
+     * priori. It can increase the accuracy of the detection. Language hint must
+     * be language code in BCP-47 format.
+     * Automatic language detection is performed if no hint is provided.
+     * 
+ * + * repeated string language_hints = 1; + */ + public java.lang.String getLanguageHints(int index) { + return languageHints_.get(index); + } + /** + * + * + *
+     * Language hint can be specified if the language to be detected is known a
+     * priori. It can increase the accuracy of the detection. Language hint must
+     * be language code in BCP-47 format.
+     * Automatic language detection is performed if no hint is provided.
+     * 
+ * + * repeated string language_hints = 1; + */ + public com.google.protobuf.ByteString getLanguageHintsBytes(int index) { + return languageHints_.getByteString(index); + } + /** + * + * + *
+     * Language hint can be specified if the language to be detected is known a
+     * priori. It can increase the accuracy of the detection. Language hint must
+     * be language code in BCP-47 format.
+     * Automatic language detection is performed if no hint is provided.
+     * 
+ * + * repeated string language_hints = 1; + */ + public Builder setLanguageHints(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLanguageHintsIsMutable(); + languageHints_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Language hint can be specified if the language to be detected is known a
+     * priori. It can increase the accuracy of the detection. Language hint must
+     * be language code in BCP-47 format.
+     * Automatic language detection is performed if no hint is provided.
+     * 
+ * + * repeated string language_hints = 1; + */ + public Builder addLanguageHints(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLanguageHintsIsMutable(); + languageHints_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Language hint can be specified if the language to be detected is known a
+     * priori. It can increase the accuracy of the detection. Language hint must
+     * be language code in BCP-47 format.
+     * Automatic language detection is performed if no hint is provided.
+     * 
+ * + * repeated string language_hints = 1; + */ + public Builder addAllLanguageHints(java.lang.Iterable values) { + ensureLanguageHintsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, languageHints_); + onChanged(); + return this; + } + /** + * + * + *
+     * Language hint can be specified if the language to be detected is known a
+     * priori. It can increase the accuracy of the detection. Language hint must
+     * be language code in BCP-47 format.
+     * Automatic language detection is performed if no hint is provided.
+     * 
+ * + * repeated string language_hints = 1; + */ + public Builder clearLanguageHints() { + languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Language hint can be specified if the language to be detected is known a
+     * priori. It can increase the accuracy of the detection. Language hint must
+     * be language code in BCP-47 format.
+     * Automatic language detection is performed if no hint is provided.
+     * 
+ * + * repeated string language_hints = 1; + */ + public Builder addLanguageHintsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLanguageHintsIsMutable(); + languageHints_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.TextDetectionConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.TextDetectionConfig) + private static final com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextDetectionConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextDetectionConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextDetectionConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextDetectionConfigOrBuilder.java new file mode 100644 index 000000000000..719afb9f910f --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextDetectionConfigOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface TextDetectionConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.TextDetectionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Language hint can be specified if the language to be detected is known a
+   * priori. It can increase the accuracy of the detection. Language hint must
+   * be language code in BCP-47 format.
+   * Automatic language detection is performed if no hint is provided.
+   * 
+ * + * repeated string language_hints = 1; + */ + java.util.List getLanguageHintsList(); + /** + * + * + *
+   * Language hint can be specified if the language to be detected is known a
+   * priori. It can increase the accuracy of the detection. Language hint must
+   * be language code in BCP-47 format.
+   * Automatic language detection is performed if no hint is provided.
+   * 
+ * + * repeated string language_hints = 1; + */ + int getLanguageHintsCount(); + /** + * + * + *
+   * Language hint can be specified if the language to be detected is known a
+   * priori. It can increase the accuracy of the detection. Language hint must
+   * be language code in BCP-47 format.
+   * Automatic language detection is performed if no hint is provided.
+   * 
+ * + * repeated string language_hints = 1; + */ + java.lang.String getLanguageHints(int index); + /** + * + * + *
+   * Language hint can be specified if the language to be detected is known a
+   * priori. It can increase the accuracy of the detection. Language hint must
+   * be language code in BCP-47 format.
+   * Automatic language detection is performed if no hint is provided.
+   * 
+ * + * repeated string language_hints = 1; + */ + com.google.protobuf.ByteString getLanguageHintsBytes(int index); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextFrame.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextFrame.java new file mode 100644 index 000000000000..38a046ea72d5 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextFrame.java @@ -0,0 +1,1008 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Video frame level annotation results for text annotation (OCR).
+ * Contains information regarding timestamp and bounding box locations for the
+ * frames containing detected OCR text snippets.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.TextFrame} + */ +public final class TextFrame extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.TextFrame) + TextFrameOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextFrame.newBuilder() to construct. + private TextFrame(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TextFrame() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TextFrame( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly.Builder + subBuilder = null; + if (rotatedBoundingBox_ != null) { + subBuilder = rotatedBoundingBox_.toBuilder(); + } + rotatedBoundingBox_ = + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rotatedBoundingBox_); + rotatedBoundingBox_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (timeOffset_ != null) { + subBuilder = timeOffset_.toBuilder(); + } + timeOffset_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timeOffset_); + timeOffset_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_TextFrame_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_TextFrame_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.TextFrame.class, + com.google.cloud.videointelligence.v1p3beta1.TextFrame.Builder.class); + } + + public static final int ROTATED_BOUNDING_BOX_FIELD_NUMBER = 1; + private com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly rotatedBoundingBox_; + /** + * + * + *
+   * Bounding polygon of the detected text for this frame.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly rotated_bounding_box = 1; + * + */ + public boolean hasRotatedBoundingBox() { + return rotatedBoundingBox_ != null; + } + /** + * + * + *
+   * Bounding polygon of the detected text for this frame.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly rotated_bounding_box = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly + getRotatedBoundingBox() { + return rotatedBoundingBox_ == null + ? com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly.getDefaultInstance() + : rotatedBoundingBox_; + } + /** + * + * + *
+   * Bounding polygon of the detected text for this frame.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly rotated_bounding_box = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPolyOrBuilder + getRotatedBoundingBoxOrBuilder() { + return getRotatedBoundingBox(); + } + + public static final int TIME_OFFSET_FIELD_NUMBER = 2; + private com.google.protobuf.Duration timeOffset_; + /** + * + * + *
+   * Timestamp of this frame.
+   * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public boolean hasTimeOffset() { + return timeOffset_ != null; + } + /** + * + * + *
+   * Timestamp of this frame.
+   * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public com.google.protobuf.Duration getTimeOffset() { + return timeOffset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeOffset_; + } + /** + * + * + *
+   * Timestamp of this frame.
+   * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public com.google.protobuf.DurationOrBuilder getTimeOffsetOrBuilder() { + return getTimeOffset(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (rotatedBoundingBox_ != null) { + output.writeMessage(1, getRotatedBoundingBox()); + } + if (timeOffset_ != null) { + output.writeMessage(2, getTimeOffset()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (rotatedBoundingBox_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getRotatedBoundingBox()); + } + if (timeOffset_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTimeOffset()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.videointelligence.v1p3beta1.TextFrame)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.TextFrame other = + (com.google.cloud.videointelligence.v1p3beta1.TextFrame) obj; + + boolean result = true; + result = result && (hasRotatedBoundingBox() == other.hasRotatedBoundingBox()); + if (hasRotatedBoundingBox()) { + result = result && getRotatedBoundingBox().equals(other.getRotatedBoundingBox()); + } + result = result && (hasTimeOffset() == other.hasTimeOffset()); + if (hasTimeOffset()) { + result = result && getTimeOffset().equals(other.getTimeOffset()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasRotatedBoundingBox()) { + hash = (37 * hash) + ROTATED_BOUNDING_BOX_FIELD_NUMBER; + hash = (53 * hash) + getRotatedBoundingBox().hashCode(); + } + if (hasTimeOffset()) { + hash = (37 * hash) + TIME_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getTimeOffset().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextFrame parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextFrame parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextFrame parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextFrame parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextFrame parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextFrame parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextFrame parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextFrame parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextFrame parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextFrame parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextFrame parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextFrame parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.TextFrame prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Video frame level annotation results for text annotation (OCR).
+   * Contains information regarding timestamp and bounding box locations for the
+   * frames containing detected OCR text snippets.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.TextFrame} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.TextFrame) + com.google.cloud.videointelligence.v1p3beta1.TextFrameOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_TextFrame_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_TextFrame_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.TextFrame.class, + com.google.cloud.videointelligence.v1p3beta1.TextFrame.Builder.class); + } + + // Construct using com.google.cloud.videointelligence.v1p3beta1.TextFrame.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (rotatedBoundingBoxBuilder_ == null) { + rotatedBoundingBox_ = null; + } else { + rotatedBoundingBox_ = null; + rotatedBoundingBoxBuilder_ = null; + } + if (timeOffsetBuilder_ == null) { + timeOffset_ = null; + } else { + timeOffset_ = null; + timeOffsetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_TextFrame_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.TextFrame getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.TextFrame.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.TextFrame build() { + com.google.cloud.videointelligence.v1p3beta1.TextFrame result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.TextFrame buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.TextFrame result = + new com.google.cloud.videointelligence.v1p3beta1.TextFrame(this); + if (rotatedBoundingBoxBuilder_ == null) { + result.rotatedBoundingBox_ = rotatedBoundingBox_; + } else { + result.rotatedBoundingBox_ = rotatedBoundingBoxBuilder_.build(); + } + if (timeOffsetBuilder_ == null) { + result.timeOffset_ = timeOffset_; + } else { + result.timeOffset_ = timeOffsetBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.videointelligence.v1p3beta1.TextFrame) { + return mergeFrom((com.google.cloud.videointelligence.v1p3beta1.TextFrame) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.videointelligence.v1p3beta1.TextFrame other) { + if (other == com.google.cloud.videointelligence.v1p3beta1.TextFrame.getDefaultInstance()) + return this; + if (other.hasRotatedBoundingBox()) { + mergeRotatedBoundingBox(other.getRotatedBoundingBox()); + } + if (other.hasTimeOffset()) { + mergeTimeOffset(other.getTimeOffset()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.TextFrame parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.TextFrame) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly + rotatedBoundingBox_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly, + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly.Builder, + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPolyOrBuilder> + rotatedBoundingBoxBuilder_; + /** + * + * + *
+     * Bounding polygon of the detected text for this frame.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly rotated_bounding_box = 1; + * + */ + public boolean hasRotatedBoundingBox() { + return rotatedBoundingBoxBuilder_ != null || rotatedBoundingBox_ != null; + } + /** + * + * + *
+     * Bounding polygon of the detected text for this frame.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly rotated_bounding_box = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly + getRotatedBoundingBox() { + if (rotatedBoundingBoxBuilder_ == null) { + return rotatedBoundingBox_ == null + ? com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly + .getDefaultInstance() + : rotatedBoundingBox_; + } else { + return rotatedBoundingBoxBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Bounding polygon of the detected text for this frame.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly rotated_bounding_box = 1; + * + */ + public Builder setRotatedBoundingBox( + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly value) { + if (rotatedBoundingBoxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rotatedBoundingBox_ = value; + onChanged(); + } else { + rotatedBoundingBoxBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Bounding polygon of the detected text for this frame.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly rotated_bounding_box = 1; + * + */ + public Builder setRotatedBoundingBox( + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly.Builder + builderForValue) { + if (rotatedBoundingBoxBuilder_ == null) { + rotatedBoundingBox_ = builderForValue.build(); + onChanged(); + } else { + rotatedBoundingBoxBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Bounding polygon of the detected text for this frame.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly rotated_bounding_box = 1; + * + */ + public Builder mergeRotatedBoundingBox( + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly value) { + if (rotatedBoundingBoxBuilder_ == null) { + if (rotatedBoundingBox_ != null) { + rotatedBoundingBox_ = + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly.newBuilder( + rotatedBoundingBox_) + .mergeFrom(value) + .buildPartial(); + } else { + rotatedBoundingBox_ = value; + } + onChanged(); + } else { + rotatedBoundingBoxBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Bounding polygon of the detected text for this frame.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly rotated_bounding_box = 1; + * + */ + public Builder clearRotatedBoundingBox() { + if (rotatedBoundingBoxBuilder_ == null) { + rotatedBoundingBox_ = null; + onChanged(); + } else { + rotatedBoundingBox_ = null; + rotatedBoundingBoxBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Bounding polygon of the detected text for this frame.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly rotated_bounding_box = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly.Builder + getRotatedBoundingBoxBuilder() { + + onChanged(); + return getRotatedBoundingBoxFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Bounding polygon of the detected text for this frame.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly rotated_bounding_box = 1; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPolyOrBuilder + getRotatedBoundingBoxOrBuilder() { + if (rotatedBoundingBoxBuilder_ != null) { + return rotatedBoundingBoxBuilder_.getMessageOrBuilder(); + } else { + return rotatedBoundingBox_ == null + ? com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly + .getDefaultInstance() + : rotatedBoundingBox_; + } + } + /** + * + * + *
+     * Bounding polygon of the detected text for this frame.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly rotated_bounding_box = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly, + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly.Builder, + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPolyOrBuilder> + getRotatedBoundingBoxFieldBuilder() { + if (rotatedBoundingBoxBuilder_ == null) { + rotatedBoundingBoxBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly, + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly.Builder, + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPolyOrBuilder>( + getRotatedBoundingBox(), getParentForChildren(), isClean()); + rotatedBoundingBox_ = null; + } + return rotatedBoundingBoxBuilder_; + } + + private com.google.protobuf.Duration timeOffset_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + timeOffsetBuilder_; + /** + * + * + *
+     * Timestamp of this frame.
+     * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public boolean hasTimeOffset() { + return timeOffsetBuilder_ != null || timeOffset_ != null; + } + /** + * + * + *
+     * Timestamp of this frame.
+     * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public com.google.protobuf.Duration getTimeOffset() { + if (timeOffsetBuilder_ == null) { + return timeOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeOffset_; + } else { + return timeOffsetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Timestamp of this frame.
+     * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public Builder setTimeOffset(com.google.protobuf.Duration value) { + if (timeOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeOffset_ = value; + onChanged(); + } else { + timeOffsetBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Timestamp of this frame.
+     * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public Builder setTimeOffset(com.google.protobuf.Duration.Builder builderForValue) { + if (timeOffsetBuilder_ == null) { + timeOffset_ = builderForValue.build(); + onChanged(); + } else { + timeOffsetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Timestamp of this frame.
+     * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public Builder mergeTimeOffset(com.google.protobuf.Duration value) { + if (timeOffsetBuilder_ == null) { + if (timeOffset_ != null) { + timeOffset_ = + com.google.protobuf.Duration.newBuilder(timeOffset_).mergeFrom(value).buildPartial(); + } else { + timeOffset_ = value; + } + onChanged(); + } else { + timeOffsetBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Timestamp of this frame.
+     * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public Builder clearTimeOffset() { + if (timeOffsetBuilder_ == null) { + timeOffset_ = null; + onChanged(); + } else { + timeOffset_ = null; + timeOffsetBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Timestamp of this frame.
+     * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public com.google.protobuf.Duration.Builder getTimeOffsetBuilder() { + + onChanged(); + return getTimeOffsetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Timestamp of this frame.
+     * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public com.google.protobuf.DurationOrBuilder getTimeOffsetOrBuilder() { + if (timeOffsetBuilder_ != null) { + return timeOffsetBuilder_.getMessageOrBuilder(); + } else { + return timeOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeOffset_; + } + } + /** + * + * + *
+     * Timestamp of this frame.
+     * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTimeOffsetFieldBuilder() { + if (timeOffsetBuilder_ == null) { + timeOffsetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTimeOffset(), getParentForChildren(), isClean()); + timeOffset_ = null; + } + return timeOffsetBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.TextFrame) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.TextFrame) + private static final com.google.cloud.videointelligence.v1p3beta1.TextFrame DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.videointelligence.v1p3beta1.TextFrame(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextFrame getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextFrame parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextFrame(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.TextFrame getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextFrameOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextFrameOrBuilder.java new file mode 100644 index 000000000000..f926925c9f09 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextFrameOrBuilder.java @@ -0,0 +1,79 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface TextFrameOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.TextFrame) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Bounding polygon of the detected text for this frame.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly rotated_bounding_box = 1; + * + */ + boolean hasRotatedBoundingBox(); + /** + * + * + *
+   * Bounding polygon of the detected text for this frame.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly rotated_bounding_box = 1; + * + */ + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly getRotatedBoundingBox(); + /** + * + * + *
+   * Bounding polygon of the detected text for this frame.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly rotated_bounding_box = 1; + * + */ + com.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPolyOrBuilder + getRotatedBoundingBoxOrBuilder(); + + /** + * + * + *
+   * Timestamp of this frame.
+   * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + boolean hasTimeOffset(); + /** + * + * + *
+   * Timestamp of this frame.
+   * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + com.google.protobuf.Duration getTimeOffset(); + /** + * + * + *
+   * Timestamp of this frame.
+   * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + com.google.protobuf.DurationOrBuilder getTimeOffsetOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextSegment.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextSegment.java new file mode 100644 index 000000000000..742e55514d6c --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextSegment.java @@ -0,0 +1,1301 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Video segment level annotation results for text detection.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.TextSegment} + */ +public final class TextSegment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.TextSegment) + TextSegmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextSegment.newBuilder() to construct. + private TextSegment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TextSegment() { + confidence_ = 0F; + frames_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TextSegment( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder subBuilder = null; + if (segment_ != null) { + subBuilder = segment_.toBuilder(); + } + segment_ = + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(segment_); + segment_ = subBuilder.buildPartial(); + } + + break; + } + case 21: + { + confidence_ = input.readFloat(); + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + frames_ = + new java.util.ArrayList< + com.google.cloud.videointelligence.v1p3beta1.TextFrame>(); + mutable_bitField0_ |= 0x00000004; + } + frames_.add( + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.TextFrame.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + frames_ = java.util.Collections.unmodifiableList(frames_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_TextSegment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_TextSegment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.TextSegment.class, + com.google.cloud.videointelligence.v1p3beta1.TextSegment.Builder.class); + } + + private int bitField0_; + public static final int SEGMENT_FIELD_NUMBER = 1; + private com.google.cloud.videointelligence.v1p3beta1.VideoSegment segment_; + /** + * + * + *
+   * Video segment where a text snippet was detected.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1; + */ + public boolean hasSegment() { + return segment_ != null; + } + /** + * + * + *
+   * Video segment where a text snippet was detected.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegment getSegment() { + return segment_ == null + ? com.google.cloud.videointelligence.v1p3beta1.VideoSegment.getDefaultInstance() + : segment_; + } + /** + * + * + *
+   * Video segment where a text snippet was detected.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder getSegmentOrBuilder() { + return getSegment(); + } + + public static final int CONFIDENCE_FIELD_NUMBER = 2; + private float confidence_; + /** + * + * + *
+   * Confidence for the track of detected text. It is calculated as the highest
+   * over all frames where OCR detected text appears.
+   * 
+ * + * float confidence = 2; + */ + public float getConfidence() { + return confidence_; + } + + public static final int FRAMES_FIELD_NUMBER = 3; + private java.util.List frames_; + /** + * + * + *
+   * Information related to the frames where OCR detected text appears.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3; + */ + public java.util.List getFramesList() { + return frames_; + } + /** + * + * + *
+   * Information related to the frames where OCR detected text appears.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3; + */ + public java.util.List + getFramesOrBuilderList() { + return frames_; + } + /** + * + * + *
+   * Information related to the frames where OCR detected text appears.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3; + */ + public int getFramesCount() { + return frames_.size(); + } + /** + * + * + *
+   * Information related to the frames where OCR detected text appears.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3; + */ + public com.google.cloud.videointelligence.v1p3beta1.TextFrame getFrames(int index) { + return frames_.get(index); + } + /** + * + * + *
+   * Information related to the frames where OCR detected text appears.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3; + */ + public com.google.cloud.videointelligence.v1p3beta1.TextFrameOrBuilder getFramesOrBuilder( + int index) { + return frames_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (segment_ != null) { + output.writeMessage(1, getSegment()); + } + if (confidence_ != 0F) { + output.writeFloat(2, confidence_); + } + for (int i = 0; i < frames_.size(); i++) { + output.writeMessage(3, frames_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (segment_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSegment()); + } + if (confidence_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, confidence_); + } + for (int i = 0; i < frames_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, frames_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.videointelligence.v1p3beta1.TextSegment)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.TextSegment other = + (com.google.cloud.videointelligence.v1p3beta1.TextSegment) obj; + + boolean result = true; + result = result && (hasSegment() == other.hasSegment()); + if (hasSegment()) { + result = result && getSegment().equals(other.getSegment()); + } + result = + result + && (java.lang.Float.floatToIntBits(getConfidence()) + == java.lang.Float.floatToIntBits(other.getConfidence())); + result = result && getFramesList().equals(other.getFramesList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSegment()) { + hash = (37 * hash) + SEGMENT_FIELD_NUMBER; + hash = (53 * hash) + getSegment().hashCode(); + } + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidence()); + if (getFramesCount() > 0) { + hash = (37 * hash) + FRAMES_FIELD_NUMBER; + hash = (53 * hash) + getFramesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextSegment parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextSegment parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextSegment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextSegment parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextSegment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextSegment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextSegment parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextSegment parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextSegment parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextSegment parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextSegment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextSegment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.TextSegment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Video segment level annotation results for text detection.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.TextSegment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.TextSegment) + com.google.cloud.videointelligence.v1p3beta1.TextSegmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_TextSegment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_TextSegment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.TextSegment.class, + com.google.cloud.videointelligence.v1p3beta1.TextSegment.Builder.class); + } + + // Construct using com.google.cloud.videointelligence.v1p3beta1.TextSegment.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getFramesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (segmentBuilder_ == null) { + segment_ = null; + } else { + segment_ = null; + segmentBuilder_ = null; + } + confidence_ = 0F; + + if (framesBuilder_ == null) { + frames_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + framesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_TextSegment_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.TextSegment getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.TextSegment.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.TextSegment build() { + com.google.cloud.videointelligence.v1p3beta1.TextSegment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.TextSegment buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.TextSegment result = + new com.google.cloud.videointelligence.v1p3beta1.TextSegment(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (segmentBuilder_ == null) { + result.segment_ = segment_; + } else { + result.segment_ = segmentBuilder_.build(); + } + result.confidence_ = confidence_; + if (framesBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + frames_ = java.util.Collections.unmodifiableList(frames_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.frames_ = frames_; + } else { + result.frames_ = framesBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.videointelligence.v1p3beta1.TextSegment) { + return mergeFrom((com.google.cloud.videointelligence.v1p3beta1.TextSegment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.videointelligence.v1p3beta1.TextSegment other) { + if (other == com.google.cloud.videointelligence.v1p3beta1.TextSegment.getDefaultInstance()) + return this; + if (other.hasSegment()) { + mergeSegment(other.getSegment()); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + if (framesBuilder_ == null) { + if (!other.frames_.isEmpty()) { + if (frames_.isEmpty()) { + frames_ = other.frames_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureFramesIsMutable(); + frames_.addAll(other.frames_); + } + onChanged(); + } + } else { + if (!other.frames_.isEmpty()) { + if (framesBuilder_.isEmpty()) { + framesBuilder_.dispose(); + framesBuilder_ = null; + frames_ = other.frames_; + bitField0_ = (bitField0_ & ~0x00000004); + framesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFramesFieldBuilder() + : null; + } else { + framesBuilder_.addAllMessages(other.frames_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.TextSegment parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.TextSegment) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.cloud.videointelligence.v1p3beta1.VideoSegment segment_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.VideoSegment, + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder, + com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder> + segmentBuilder_; + /** + * + * + *
+     * Video segment where a text snippet was detected.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1; + */ + public boolean hasSegment() { + return segmentBuilder_ != null || segment_ != null; + } + /** + * + * + *
+     * Video segment where a text snippet was detected.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegment getSegment() { + if (segmentBuilder_ == null) { + return segment_ == null + ? com.google.cloud.videointelligence.v1p3beta1.VideoSegment.getDefaultInstance() + : segment_; + } else { + return segmentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Video segment where a text snippet was detected.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1; + */ + public Builder setSegment(com.google.cloud.videointelligence.v1p3beta1.VideoSegment value) { + if (segmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + segment_ = value; + onChanged(); + } else { + segmentBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Video segment where a text snippet was detected.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1; + */ + public Builder setSegment( + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder builderForValue) { + if (segmentBuilder_ == null) { + segment_ = builderForValue.build(); + onChanged(); + } else { + segmentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Video segment where a text snippet was detected.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1; + */ + public Builder mergeSegment(com.google.cloud.videointelligence.v1p3beta1.VideoSegment value) { + if (segmentBuilder_ == null) { + if (segment_ != null) { + segment_ = + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.newBuilder(segment_) + .mergeFrom(value) + .buildPartial(); + } else { + segment_ = value; + } + onChanged(); + } else { + segmentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Video segment where a text snippet was detected.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1; + */ + public Builder clearSegment() { + if (segmentBuilder_ == null) { + segment_ = null; + onChanged(); + } else { + segment_ = null; + segmentBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Video segment where a text snippet was detected.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder getSegmentBuilder() { + + onChanged(); + return getSegmentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Video segment where a text snippet was detected.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder + getSegmentOrBuilder() { + if (segmentBuilder_ != null) { + return segmentBuilder_.getMessageOrBuilder(); + } else { + return segment_ == null + ? com.google.cloud.videointelligence.v1p3beta1.VideoSegment.getDefaultInstance() + : segment_; + } + } + /** + * + * + *
+     * Video segment where a text snippet was detected.
+     * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.VideoSegment, + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder, + com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder> + getSegmentFieldBuilder() { + if (segmentBuilder_ == null) { + segmentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.VideoSegment, + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder, + com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder>( + getSegment(), getParentForChildren(), isClean()); + segment_ = null; + } + return segmentBuilder_; + } + + private float confidence_; + /** + * + * + *
+     * Confidence for the track of detected text. It is calculated as the highest
+     * over all frames where OCR detected text appears.
+     * 
+ * + * float confidence = 2; + */ + public float getConfidence() { + return confidence_; + } + /** + * + * + *
+     * Confidence for the track of detected text. It is calculated as the highest
+     * over all frames where OCR detected text appears.
+     * 
+ * + * float confidence = 2; + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Confidence for the track of detected text. It is calculated as the highest
+     * over all frames where OCR detected text appears.
+     * 
+ * + * float confidence = 2; + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + + private java.util.List frames_ = + java.util.Collections.emptyList(); + + private void ensureFramesIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + frames_ = + new java.util.ArrayList( + frames_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.TextFrame, + com.google.cloud.videointelligence.v1p3beta1.TextFrame.Builder, + com.google.cloud.videointelligence.v1p3beta1.TextFrameOrBuilder> + framesBuilder_; + + /** + * + * + *
+     * Information related to the frames where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3; + */ + public java.util.List getFramesList() { + if (framesBuilder_ == null) { + return java.util.Collections.unmodifiableList(frames_); + } else { + return framesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Information related to the frames where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3; + */ + public int getFramesCount() { + if (framesBuilder_ == null) { + return frames_.size(); + } else { + return framesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Information related to the frames where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3; + */ + public com.google.cloud.videointelligence.v1p3beta1.TextFrame getFrames(int index) { + if (framesBuilder_ == null) { + return frames_.get(index); + } else { + return framesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Information related to the frames where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3; + */ + public Builder setFrames( + int index, com.google.cloud.videointelligence.v1p3beta1.TextFrame value) { + if (framesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFramesIsMutable(); + frames_.set(index, value); + onChanged(); + } else { + framesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Information related to the frames where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3; + */ + public Builder setFrames( + int index, com.google.cloud.videointelligence.v1p3beta1.TextFrame.Builder builderForValue) { + if (framesBuilder_ == null) { + ensureFramesIsMutable(); + frames_.set(index, builderForValue.build()); + onChanged(); + } else { + framesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Information related to the frames where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3; + */ + public Builder addFrames(com.google.cloud.videointelligence.v1p3beta1.TextFrame value) { + if (framesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFramesIsMutable(); + frames_.add(value); + onChanged(); + } else { + framesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Information related to the frames where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3; + */ + public Builder addFrames( + int index, com.google.cloud.videointelligence.v1p3beta1.TextFrame value) { + if (framesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFramesIsMutable(); + frames_.add(index, value); + onChanged(); + } else { + framesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Information related to the frames where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3; + */ + public Builder addFrames( + com.google.cloud.videointelligence.v1p3beta1.TextFrame.Builder builderForValue) { + if (framesBuilder_ == null) { + ensureFramesIsMutable(); + frames_.add(builderForValue.build()); + onChanged(); + } else { + framesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Information related to the frames where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3; + */ + public Builder addFrames( + int index, com.google.cloud.videointelligence.v1p3beta1.TextFrame.Builder builderForValue) { + if (framesBuilder_ == null) { + ensureFramesIsMutable(); + frames_.add(index, builderForValue.build()); + onChanged(); + } else { + framesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Information related to the frames where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3; + */ + public Builder addAllFrames( + java.lang.Iterable + values) { + if (framesBuilder_ == null) { + ensureFramesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, frames_); + onChanged(); + } else { + framesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Information related to the frames where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3; + */ + public Builder clearFrames() { + if (framesBuilder_ == null) { + frames_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + framesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Information related to the frames where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3; + */ + public Builder removeFrames(int index) { + if (framesBuilder_ == null) { + ensureFramesIsMutable(); + frames_.remove(index); + onChanged(); + } else { + framesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Information related to the frames where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3; + */ + public com.google.cloud.videointelligence.v1p3beta1.TextFrame.Builder getFramesBuilder( + int index) { + return getFramesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Information related to the frames where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3; + */ + public com.google.cloud.videointelligence.v1p3beta1.TextFrameOrBuilder getFramesOrBuilder( + int index) { + if (framesBuilder_ == null) { + return frames_.get(index); + } else { + return framesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Information related to the frames where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3; + */ + public java.util.List + getFramesOrBuilderList() { + if (framesBuilder_ != null) { + return framesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(frames_); + } + } + /** + * + * + *
+     * Information related to the frames where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3; + */ + public com.google.cloud.videointelligence.v1p3beta1.TextFrame.Builder addFramesBuilder() { + return getFramesFieldBuilder() + .addBuilder(com.google.cloud.videointelligence.v1p3beta1.TextFrame.getDefaultInstance()); + } + /** + * + * + *
+     * Information related to the frames where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3; + */ + public com.google.cloud.videointelligence.v1p3beta1.TextFrame.Builder addFramesBuilder( + int index) { + return getFramesFieldBuilder() + .addBuilder( + index, com.google.cloud.videointelligence.v1p3beta1.TextFrame.getDefaultInstance()); + } + /** + * + * + *
+     * Information related to the frames where OCR detected text appears.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3; + */ + public java.util.List + getFramesBuilderList() { + return getFramesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.TextFrame, + com.google.cloud.videointelligence.v1p3beta1.TextFrame.Builder, + com.google.cloud.videointelligence.v1p3beta1.TextFrameOrBuilder> + getFramesFieldBuilder() { + if (framesBuilder_ == null) { + framesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.TextFrame, + com.google.cloud.videointelligence.v1p3beta1.TextFrame.Builder, + com.google.cloud.videointelligence.v1p3beta1.TextFrameOrBuilder>( + frames_, + ((bitField0_ & 0x00000004) == 0x00000004), + getParentForChildren(), + isClean()); + frames_ = null; + } + return framesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.TextSegment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.TextSegment) + private static final com.google.cloud.videointelligence.v1p3beta1.TextSegment DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.videointelligence.v1p3beta1.TextSegment(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.TextSegment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextSegment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextSegment(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.TextSegment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextSegmentOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextSegmentOrBuilder.java new file mode 100644 index 000000000000..ee05e74dadf8 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/TextSegmentOrBuilder.java @@ -0,0 +1,105 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface TextSegmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.TextSegment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Video segment where a text snippet was detected.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1; + */ + boolean hasSegment(); + /** + * + * + *
+   * Video segment where a text snippet was detected.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1; + */ + com.google.cloud.videointelligence.v1p3beta1.VideoSegment getSegment(); + /** + * + * + *
+   * Video segment where a text snippet was detected.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.VideoSegment segment = 1; + */ + com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder getSegmentOrBuilder(); + + /** + * + * + *
+   * Confidence for the track of detected text. It is calculated as the highest
+   * over all frames where OCR detected text appears.
+   * 
+ * + * float confidence = 2; + */ + float getConfidence(); + + /** + * + * + *
+   * Information related to the frames where OCR detected text appears.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3; + */ + java.util.List getFramesList(); + /** + * + * + *
+   * Information related to the frames where OCR detected text appears.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3; + */ + com.google.cloud.videointelligence.v1p3beta1.TextFrame getFrames(int index); + /** + * + * + *
+   * Information related to the frames where OCR detected text appears.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3; + */ + int getFramesCount(); + /** + * + * + *
+   * Information related to the frames where OCR detected text appears.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3; + */ + java.util.List + getFramesOrBuilderList(); + /** + * + * + *
+   * Information related to the frames where OCR detected text appears.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextFrame frames = 3; + */ + com.google.cloud.videointelligence.v1p3beta1.TextFrameOrBuilder getFramesOrBuilder(int index); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoAnnotationProgress.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoAnnotationProgress.java new file mode 100644 index 000000000000..4ae3f57419d5 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoAnnotationProgress.java @@ -0,0 +1,1220 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Annotation progress for a single video.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress} + */ +public final class VideoAnnotationProgress extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress) + VideoAnnotationProgressOrBuilder { + private static final long serialVersionUID = 0L; + // Use VideoAnnotationProgress.newBuilder() to construct. + private VideoAnnotationProgress(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VideoAnnotationProgress() { + inputUri_ = ""; + progressPercent_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VideoAnnotationProgress( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + inputUri_ = s; + break; + } + case 16: + { + progressPercent_ = input.readInt32(); + break; + } + case 26: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (startTime_ != null) { + subBuilder = startTime_.toBuilder(); + } + startTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTime_); + startTime_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_VideoAnnotationProgress_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_VideoAnnotationProgress_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress.class, + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress.Builder.class); + } + + public static final int INPUT_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object inputUri_; + /** + * + * + *
+   * Video file location in
+   * [Google Cloud Storage](https://cloud.google.com/storage/).
+   * 
+ * + * string input_uri = 1; + */ + public java.lang.String getInputUri() { + java.lang.Object ref = inputUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + inputUri_ = s; + return s; + } + } + /** + * + * + *
+   * Video file location in
+   * [Google Cloud Storage](https://cloud.google.com/storage/).
+   * 
+ * + * string input_uri = 1; + */ + public com.google.protobuf.ByteString getInputUriBytes() { + java.lang.Object ref = inputUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + inputUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROGRESS_PERCENT_FIELD_NUMBER = 2; + private int progressPercent_; + /** + * + * + *
+   * Approximate percentage processed thus far. Guaranteed to be
+   * 100 when fully processed.
+   * 
+ * + * int32 progress_percent = 2; + */ + public int getProgressPercent() { + return progressPercent_; + } + + public static final int START_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * Time when the request was received.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 3; + */ + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * Time when the request was received.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 3; + */ + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * Time when the request was received.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Time of the most recent update.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Time of the most recent update.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Time of the most recent update.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getInputUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, inputUri_); + } + if (progressPercent_ != 0) { + output.writeInt32(2, progressPercent_); + } + if (startTime_ != null) { + output.writeMessage(3, getStartTime()); + } + if (updateTime_ != null) { + output.writeMessage(4, getUpdateTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getInputUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, inputUri_); + } + if (progressPercent_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, progressPercent_); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getStartTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress other = + (com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress) obj; + + boolean result = true; + result = result && getInputUri().equals(other.getInputUri()); + result = result && (getProgressPercent() == other.getProgressPercent()); + result = result && (hasStartTime() == other.hasStartTime()); + if (hasStartTime()) { + result = result && getStartTime().equals(other.getStartTime()); + } + result = result && (hasUpdateTime() == other.hasUpdateTime()); + if (hasUpdateTime()) { + result = result && getUpdateTime().equals(other.getUpdateTime()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INPUT_URI_FIELD_NUMBER; + hash = (53 * hash) + getInputUri().hashCode(); + hash = (37 * hash) + PROGRESS_PERCENT_FIELD_NUMBER; + hash = (53 * hash) + getProgressPercent(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Annotation progress for a single video.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress) + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgressOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_VideoAnnotationProgress_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_VideoAnnotationProgress_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress.class, + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress.Builder.class); + } + + // Construct using + // com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + inputUri_ = ""; + + progressPercent_ = 0; + + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_VideoAnnotationProgress_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress + getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress build() { + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress result = + new com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress(this); + result.inputUri_ = inputUri_; + result.progressPercent_ = progressPercent_; + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress) { + return mergeFrom( + (com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress other) { + if (other + == com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress + .getDefaultInstance()) return this; + if (!other.getInputUri().isEmpty()) { + inputUri_ = other.inputUri_; + onChanged(); + } + if (other.getProgressPercent() != 0) { + setProgressPercent(other.getProgressPercent()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object inputUri_ = ""; + /** + * + * + *
+     * Video file location in
+     * [Google Cloud Storage](https://cloud.google.com/storage/).
+     * 
+ * + * string input_uri = 1; + */ + public java.lang.String getInputUri() { + java.lang.Object ref = inputUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + inputUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Video file location in
+     * [Google Cloud Storage](https://cloud.google.com/storage/).
+     * 
+ * + * string input_uri = 1; + */ + public com.google.protobuf.ByteString getInputUriBytes() { + java.lang.Object ref = inputUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + inputUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Video file location in
+     * [Google Cloud Storage](https://cloud.google.com/storage/).
+     * 
+ * + * string input_uri = 1; + */ + public Builder setInputUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + inputUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Video file location in
+     * [Google Cloud Storage](https://cloud.google.com/storage/).
+     * 
+ * + * string input_uri = 1; + */ + public Builder clearInputUri() { + + inputUri_ = getDefaultInstance().getInputUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Video file location in
+     * [Google Cloud Storage](https://cloud.google.com/storage/).
+     * 
+ * + * string input_uri = 1; + */ + public Builder setInputUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + inputUri_ = value; + onChanged(); + return this; + } + + private int progressPercent_; + /** + * + * + *
+     * Approximate percentage processed thus far. Guaranteed to be
+     * 100 when fully processed.
+     * 
+ * + * int32 progress_percent = 2; + */ + public int getProgressPercent() { + return progressPercent_; + } + /** + * + * + *
+     * Approximate percentage processed thus far. Guaranteed to be
+     * 100 when fully processed.
+     * 
+ * + * int32 progress_percent = 2; + */ + public Builder setProgressPercent(int value) { + + progressPercent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Approximate percentage processed thus far. Guaranteed to be
+     * 100 when fully processed.
+     * 
+ * + * int32 progress_percent = 2; + */ + public Builder clearProgressPercent() { + + progressPercent_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp startTime_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * Time when the request was received.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 3; + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + * + * + *
+     * Time when the request was received.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 3; + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Time when the request was received.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 3; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Time when the request was received.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 3; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Time when the request was received.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 3; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Time when the request was received.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 3; + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Time when the request was received.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Time when the request was received.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * Time when the request was received.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Time of the most recent update.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Time of the most recent update.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Time of the most recent update.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Time of the most recent update.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Time of the most recent update.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Time of the most recent update.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Time of the most recent update.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Time of the most recent update.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Time of the most recent update.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress) + private static final com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VideoAnnotationProgress parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VideoAnnotationProgress(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoAnnotationProgressOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoAnnotationProgressOrBuilder.java new file mode 100644 index 000000000000..b5037584448e --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoAnnotationProgressOrBuilder.java @@ -0,0 +1,107 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface VideoAnnotationProgressOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Video file location in
+   * [Google Cloud Storage](https://cloud.google.com/storage/).
+   * 
+ * + * string input_uri = 1; + */ + java.lang.String getInputUri(); + /** + * + * + *
+   * Video file location in
+   * [Google Cloud Storage](https://cloud.google.com/storage/).
+   * 
+ * + * string input_uri = 1; + */ + com.google.protobuf.ByteString getInputUriBytes(); + + /** + * + * + *
+   * Approximate percentage processed thus far. Guaranteed to be
+   * 100 when fully processed.
+   * 
+ * + * int32 progress_percent = 2; + */ + int getProgressPercent(); + + /** + * + * + *
+   * Time when the request was received.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 3; + */ + boolean hasStartTime(); + /** + * + * + *
+   * Time when the request was received.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 3; + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * Time when the request was received.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * Time of the most recent update.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Time of the most recent update.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Time of the most recent update.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoAnnotationResults.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoAnnotationResults.java new file mode 100644 index 000000000000..84fd88448bcb --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoAnnotationResults.java @@ -0,0 +1,4645 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Annotation results for a single video.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults} + */ +public final class VideoAnnotationResults extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults) + VideoAnnotationResultsOrBuilder { + private static final long serialVersionUID = 0L; + // Use VideoAnnotationResults.newBuilder() to construct. + private VideoAnnotationResults(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VideoAnnotationResults() { + inputUri_ = ""; + segmentLabelAnnotations_ = java.util.Collections.emptyList(); + shotLabelAnnotations_ = java.util.Collections.emptyList(); + frameLabelAnnotations_ = java.util.Collections.emptyList(); + shotAnnotations_ = java.util.Collections.emptyList(); + textAnnotations_ = java.util.Collections.emptyList(); + objectAnnotations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VideoAnnotationResults( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + inputUri_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + segmentLabelAnnotations_ = + new java.util.ArrayList< + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation>(); + mutable_bitField0_ |= 0x00000002; + } + segmentLabelAnnotations_.add( + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.parser(), + extensionRegistry)); + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + shotLabelAnnotations_ = + new java.util.ArrayList< + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation>(); + mutable_bitField0_ |= 0x00000004; + } + shotLabelAnnotations_.add( + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.parser(), + extensionRegistry)); + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + frameLabelAnnotations_ = + new java.util.ArrayList< + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation>(); + mutable_bitField0_ |= 0x00000008; + } + frameLabelAnnotations_.add( + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.parser(), + extensionRegistry)); + break; + } + case 50: + { + if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + shotAnnotations_ = + new java.util.ArrayList< + com.google.cloud.videointelligence.v1p3beta1.VideoSegment>(); + mutable_bitField0_ |= 0x00000010; + } + shotAnnotations_.add( + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.parser(), + extensionRegistry)); + break; + } + case 58: + { + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation.Builder + subBuilder = null; + if (explicitAnnotation_ != null) { + subBuilder = explicitAnnotation_.toBuilder(); + } + explicitAnnotation_ = + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(explicitAnnotation_); + explicitAnnotation_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + com.google.rpc.Status.Builder subBuilder = null; + if (error_ != null) { + subBuilder = error_.toBuilder(); + } + error_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(error_); + error_ = subBuilder.buildPartial(); + } + + break; + } + case 98: + { + if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { + textAnnotations_ = + new java.util.ArrayList< + com.google.cloud.videointelligence.v1p3beta1.TextAnnotation>(); + mutable_bitField0_ |= 0x00000040; + } + textAnnotations_.add( + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.TextAnnotation.parser(), + extensionRegistry)); + break; + } + case 114: + { + if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + objectAnnotations_ = + new java.util.ArrayList< + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation>(); + mutable_bitField0_ |= 0x00000080; + } + objectAnnotations_.add( + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation + .parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + segmentLabelAnnotations_ = java.util.Collections.unmodifiableList(segmentLabelAnnotations_); + } + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + shotLabelAnnotations_ = java.util.Collections.unmodifiableList(shotLabelAnnotations_); + } + if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + frameLabelAnnotations_ = java.util.Collections.unmodifiableList(frameLabelAnnotations_); + } + if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + shotAnnotations_ = java.util.Collections.unmodifiableList(shotAnnotations_); + } + if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { + textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); + } + if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + objectAnnotations_ = java.util.Collections.unmodifiableList(objectAnnotations_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_VideoAnnotationResults_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_VideoAnnotationResults_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults.class, + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults.Builder.class); + } + + private int bitField0_; + public static final int INPUT_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object inputUri_; + /** + * + * + *
+   * Video file location in
+   * [Google Cloud Storage](https://cloud.google.com/storage/).
+   * 
+ * + * string input_uri = 1; + */ + public java.lang.String getInputUri() { + java.lang.Object ref = inputUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + inputUri_ = s; + return s; + } + } + /** + * + * + *
+   * Video file location in
+   * [Google Cloud Storage](https://cloud.google.com/storage/).
+   * 
+ * + * string input_uri = 1; + */ + public com.google.protobuf.ByteString getInputUriBytes() { + java.lang.Object ref = inputUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + inputUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SEGMENT_LABEL_ANNOTATIONS_FIELD_NUMBER = 2; + private java.util.List + segmentLabelAnnotations_; + /** + * + * + *
+   * Label annotations on video level or user specified segment level.
+   * There is exactly one element for each unique label.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation segment_label_annotations = 2; + * + */ + public java.util.List + getSegmentLabelAnnotationsList() { + return segmentLabelAnnotations_; + } + /** + * + * + *
+   * Label annotations on video level or user specified segment level.
+   * There is exactly one element for each unique label.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation segment_label_annotations = 2; + * + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder> + getSegmentLabelAnnotationsOrBuilderList() { + return segmentLabelAnnotations_; + } + /** + * + * + *
+   * Label annotations on video level or user specified segment level.
+   * There is exactly one element for each unique label.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation segment_label_annotations = 2; + * + */ + public int getSegmentLabelAnnotationsCount() { + return segmentLabelAnnotations_.size(); + } + /** + * + * + *
+   * Label annotations on video level or user specified segment level.
+   * There is exactly one element for each unique label.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation segment_label_annotations = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation getSegmentLabelAnnotations( + int index) { + return segmentLabelAnnotations_.get(index); + } + /** + * + * + *
+   * Label annotations on video level or user specified segment level.
+   * There is exactly one element for each unique label.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation segment_label_annotations = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder + getSegmentLabelAnnotationsOrBuilder(int index) { + return segmentLabelAnnotations_.get(index); + } + + public static final int SHOT_LABEL_ANNOTATIONS_FIELD_NUMBER = 3; + private java.util.List + shotLabelAnnotations_; + /** + * + * + *
+   * Label annotations on shot level.
+   * There is exactly one element for each unique label.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation shot_label_annotations = 3; + * + */ + public java.util.List + getShotLabelAnnotationsList() { + return shotLabelAnnotations_; + } + /** + * + * + *
+   * Label annotations on shot level.
+   * There is exactly one element for each unique label.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation shot_label_annotations = 3; + * + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder> + getShotLabelAnnotationsOrBuilderList() { + return shotLabelAnnotations_; + } + /** + * + * + *
+   * Label annotations on shot level.
+   * There is exactly one element for each unique label.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation shot_label_annotations = 3; + * + */ + public int getShotLabelAnnotationsCount() { + return shotLabelAnnotations_.size(); + } + /** + * + * + *
+   * Label annotations on shot level.
+   * There is exactly one element for each unique label.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation shot_label_annotations = 3; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation getShotLabelAnnotations( + int index) { + return shotLabelAnnotations_.get(index); + } + /** + * + * + *
+   * Label annotations on shot level.
+   * There is exactly one element for each unique label.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation shot_label_annotations = 3; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder + getShotLabelAnnotationsOrBuilder(int index) { + return shotLabelAnnotations_.get(index); + } + + public static final int FRAME_LABEL_ANNOTATIONS_FIELD_NUMBER = 4; + private java.util.List + frameLabelAnnotations_; + /** + * + * + *
+   * Label annotations on frame level.
+   * There is exactly one element for each unique label.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation frame_label_annotations = 4; + * + */ + public java.util.List + getFrameLabelAnnotationsList() { + return frameLabelAnnotations_; + } + /** + * + * + *
+   * Label annotations on frame level.
+   * There is exactly one element for each unique label.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation frame_label_annotations = 4; + * + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder> + getFrameLabelAnnotationsOrBuilderList() { + return frameLabelAnnotations_; + } + /** + * + * + *
+   * Label annotations on frame level.
+   * There is exactly one element for each unique label.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation frame_label_annotations = 4; + * + */ + public int getFrameLabelAnnotationsCount() { + return frameLabelAnnotations_.size(); + } + /** + * + * + *
+   * Label annotations on frame level.
+   * There is exactly one element for each unique label.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation frame_label_annotations = 4; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation getFrameLabelAnnotations( + int index) { + return frameLabelAnnotations_.get(index); + } + /** + * + * + *
+   * Label annotations on frame level.
+   * There is exactly one element for each unique label.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation frame_label_annotations = 4; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder + getFrameLabelAnnotationsOrBuilder(int index) { + return frameLabelAnnotations_.get(index); + } + + public static final int SHOT_ANNOTATIONS_FIELD_NUMBER = 6; + private java.util.List + shotAnnotations_; + /** + * + * + *
+   * Shot annotations. Each shot is represented as a video segment.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 6; + * + */ + public java.util.List + getShotAnnotationsList() { + return shotAnnotations_; + } + /** + * + * + *
+   * Shot annotations. Each shot is represented as a video segment.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 6; + * + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder> + getShotAnnotationsOrBuilderList() { + return shotAnnotations_; + } + /** + * + * + *
+   * Shot annotations. Each shot is represented as a video segment.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 6; + * + */ + public int getShotAnnotationsCount() { + return shotAnnotations_.size(); + } + /** + * + * + *
+   * Shot annotations. Each shot is represented as a video segment.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 6; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegment getShotAnnotations(int index) { + return shotAnnotations_.get(index); + } + /** + * + * + *
+   * Shot annotations. Each shot is represented as a video segment.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 6; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder + getShotAnnotationsOrBuilder(int index) { + return shotAnnotations_.get(index); + } + + public static final int EXPLICIT_ANNOTATION_FIELD_NUMBER = 7; + private com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation + explicitAnnotation_; + /** + * + * + *
+   * Explicit content annotation.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation explicit_annotation = 7; + * + */ + public boolean hasExplicitAnnotation() { + return explicitAnnotation_ != null; + } + /** + * + * + *
+   * Explicit content annotation.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation explicit_annotation = 7; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation + getExplicitAnnotation() { + return explicitAnnotation_ == null + ? com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation + .getDefaultInstance() + : explicitAnnotation_; + } + /** + * + * + *
+   * Explicit content annotation.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation explicit_annotation = 7; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotationOrBuilder + getExplicitAnnotationOrBuilder() { + return getExplicitAnnotation(); + } + + public static final int TEXT_ANNOTATIONS_FIELD_NUMBER = 12; + private java.util.List + textAnnotations_; + /** + * + * + *
+   * OCR text detection and tracking.
+   * Annotations for list of detected text snippets. Each will have list of
+   * frame information associated with it.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextAnnotation text_annotations = 12; + * + */ + public java.util.List + getTextAnnotationsList() { + return textAnnotations_; + } + /** + * + * + *
+   * OCR text detection and tracking.
+   * Annotations for list of detected text snippets. Each will have list of
+   * frame information associated with it.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextAnnotation text_annotations = 12; + * + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.TextAnnotationOrBuilder> + getTextAnnotationsOrBuilderList() { + return textAnnotations_; + } + /** + * + * + *
+   * OCR text detection and tracking.
+   * Annotations for list of detected text snippets. Each will have list of
+   * frame information associated with it.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextAnnotation text_annotations = 12; + * + */ + public int getTextAnnotationsCount() { + return textAnnotations_.size(); + } + /** + * + * + *
+   * OCR text detection and tracking.
+   * Annotations for list of detected text snippets. Each will have list of
+   * frame information associated with it.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextAnnotation text_annotations = 12; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.TextAnnotation getTextAnnotations(int index) { + return textAnnotations_.get(index); + } + /** + * + * + *
+   * OCR text detection and tracking.
+   * Annotations for list of detected text snippets. Each will have list of
+   * frame information associated with it.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextAnnotation text_annotations = 12; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.TextAnnotationOrBuilder + getTextAnnotationsOrBuilder(int index) { + return textAnnotations_.get(index); + } + + public static final int OBJECT_ANNOTATIONS_FIELD_NUMBER = 14; + private java.util.List + objectAnnotations_; + /** + * + * + *
+   * Annotations for list of objects detected and tracked in video.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 14; + * + */ + public java.util.List + getObjectAnnotationsList() { + return objectAnnotations_; + } + /** + * + * + *
+   * Annotations for list of objects detected and tracked in video.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 14; + * + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotationOrBuilder> + getObjectAnnotationsOrBuilderList() { + return objectAnnotations_; + } + /** + * + * + *
+   * Annotations for list of objects detected and tracked in video.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 14; + * + */ + public int getObjectAnnotationsCount() { + return objectAnnotations_.size(); + } + /** + * + * + *
+   * Annotations for list of objects detected and tracked in video.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 14; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation getObjectAnnotations( + int index) { + return objectAnnotations_.get(index); + } + /** + * + * + *
+   * Annotations for list of objects detected and tracked in video.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 14; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotationOrBuilder + getObjectAnnotationsOrBuilder(int index) { + return objectAnnotations_.get(index); + } + + public static final int ERROR_FIELD_NUMBER = 9; + private com.google.rpc.Status error_; + /** + * + * + *
+   * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
+   * some videos may succeed and some may fail.
+   * 
+ * + * .google.rpc.Status error = 9; + */ + public boolean hasError() { + return error_ != null; + } + /** + * + * + *
+   * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
+   * some videos may succeed and some may fail.
+   * 
+ * + * .google.rpc.Status error = 9; + */ + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + /** + * + * + *
+   * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
+   * some videos may succeed and some may fail.
+   * 
+ * + * .google.rpc.Status error = 9; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return getError(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getInputUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, inputUri_); + } + for (int i = 0; i < segmentLabelAnnotations_.size(); i++) { + output.writeMessage(2, segmentLabelAnnotations_.get(i)); + } + for (int i = 0; i < shotLabelAnnotations_.size(); i++) { + output.writeMessage(3, shotLabelAnnotations_.get(i)); + } + for (int i = 0; i < frameLabelAnnotations_.size(); i++) { + output.writeMessage(4, frameLabelAnnotations_.get(i)); + } + for (int i = 0; i < shotAnnotations_.size(); i++) { + output.writeMessage(6, shotAnnotations_.get(i)); + } + if (explicitAnnotation_ != null) { + output.writeMessage(7, getExplicitAnnotation()); + } + if (error_ != null) { + output.writeMessage(9, getError()); + } + for (int i = 0; i < textAnnotations_.size(); i++) { + output.writeMessage(12, textAnnotations_.get(i)); + } + for (int i = 0; i < objectAnnotations_.size(); i++) { + output.writeMessage(14, objectAnnotations_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getInputUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, inputUri_); + } + for (int i = 0; i < segmentLabelAnnotations_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, segmentLabelAnnotations_.get(i)); + } + for (int i = 0; i < shotLabelAnnotations_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, shotLabelAnnotations_.get(i)); + } + for (int i = 0; i < frameLabelAnnotations_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, frameLabelAnnotations_.get(i)); + } + for (int i = 0; i < shotAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, shotAnnotations_.get(i)); + } + if (explicitAnnotation_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getExplicitAnnotation()); + } + if (error_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getError()); + } + for (int i = 0; i < textAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, textAnnotations_.get(i)); + } + for (int i = 0; i < objectAnnotations_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(14, objectAnnotations_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults other = + (com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults) obj; + + boolean result = true; + result = result && getInputUri().equals(other.getInputUri()); + result = + result && getSegmentLabelAnnotationsList().equals(other.getSegmentLabelAnnotationsList()); + result = result && getShotLabelAnnotationsList().equals(other.getShotLabelAnnotationsList()); + result = result && getFrameLabelAnnotationsList().equals(other.getFrameLabelAnnotationsList()); + result = result && getShotAnnotationsList().equals(other.getShotAnnotationsList()); + result = result && (hasExplicitAnnotation() == other.hasExplicitAnnotation()); + if (hasExplicitAnnotation()) { + result = result && getExplicitAnnotation().equals(other.getExplicitAnnotation()); + } + result = result && getTextAnnotationsList().equals(other.getTextAnnotationsList()); + result = result && getObjectAnnotationsList().equals(other.getObjectAnnotationsList()); + result = result && (hasError() == other.hasError()); + if (hasError()) { + result = result && getError().equals(other.getError()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INPUT_URI_FIELD_NUMBER; + hash = (53 * hash) + getInputUri().hashCode(); + if (getSegmentLabelAnnotationsCount() > 0) { + hash = (37 * hash) + SEGMENT_LABEL_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getSegmentLabelAnnotationsList().hashCode(); + } + if (getShotLabelAnnotationsCount() > 0) { + hash = (37 * hash) + SHOT_LABEL_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getShotLabelAnnotationsList().hashCode(); + } + if (getFrameLabelAnnotationsCount() > 0) { + hash = (37 * hash) + FRAME_LABEL_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getFrameLabelAnnotationsList().hashCode(); + } + if (getShotAnnotationsCount() > 0) { + hash = (37 * hash) + SHOT_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getShotAnnotationsList().hashCode(); + } + if (hasExplicitAnnotation()) { + hash = (37 * hash) + EXPLICIT_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getExplicitAnnotation().hashCode(); + } + if (getTextAnnotationsCount() > 0) { + hash = (37 * hash) + TEXT_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getTextAnnotationsList().hashCode(); + } + if (getObjectAnnotationsCount() > 0) { + hash = (37 * hash) + OBJECT_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getObjectAnnotationsList().hashCode(); + } + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Annotation results for a single video.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults) + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResultsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_VideoAnnotationResults_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_VideoAnnotationResults_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults.class, + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults.Builder.class); + } + + // Construct using + // com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSegmentLabelAnnotationsFieldBuilder(); + getShotLabelAnnotationsFieldBuilder(); + getFrameLabelAnnotationsFieldBuilder(); + getShotAnnotationsFieldBuilder(); + getTextAnnotationsFieldBuilder(); + getObjectAnnotationsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + inputUri_ = ""; + + if (segmentLabelAnnotationsBuilder_ == null) { + segmentLabelAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + segmentLabelAnnotationsBuilder_.clear(); + } + if (shotLabelAnnotationsBuilder_ == null) { + shotLabelAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + shotLabelAnnotationsBuilder_.clear(); + } + if (frameLabelAnnotationsBuilder_ == null) { + frameLabelAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + frameLabelAnnotationsBuilder_.clear(); + } + if (shotAnnotationsBuilder_ == null) { + shotAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + shotAnnotationsBuilder_.clear(); + } + if (explicitAnnotationBuilder_ == null) { + explicitAnnotation_ = null; + } else { + explicitAnnotation_ = null; + explicitAnnotationBuilder_ = null; + } + if (textAnnotationsBuilder_ == null) { + textAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + } else { + textAnnotationsBuilder_.clear(); + } + if (objectAnnotationsBuilder_ == null) { + objectAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + } else { + objectAnnotationsBuilder_.clear(); + } + if (errorBuilder_ == null) { + error_ = null; + } else { + error_ = null; + errorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_VideoAnnotationResults_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults + getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults build() { + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults result = + new com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.inputUri_ = inputUri_; + if (segmentLabelAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + segmentLabelAnnotations_ = + java.util.Collections.unmodifiableList(segmentLabelAnnotations_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.segmentLabelAnnotations_ = segmentLabelAnnotations_; + } else { + result.segmentLabelAnnotations_ = segmentLabelAnnotationsBuilder_.build(); + } + if (shotLabelAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + shotLabelAnnotations_ = java.util.Collections.unmodifiableList(shotLabelAnnotations_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.shotLabelAnnotations_ = shotLabelAnnotations_; + } else { + result.shotLabelAnnotations_ = shotLabelAnnotationsBuilder_.build(); + } + if (frameLabelAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008)) { + frameLabelAnnotations_ = java.util.Collections.unmodifiableList(frameLabelAnnotations_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.frameLabelAnnotations_ = frameLabelAnnotations_; + } else { + result.frameLabelAnnotations_ = frameLabelAnnotationsBuilder_.build(); + } + if (shotAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { + shotAnnotations_ = java.util.Collections.unmodifiableList(shotAnnotations_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.shotAnnotations_ = shotAnnotations_; + } else { + result.shotAnnotations_ = shotAnnotationsBuilder_.build(); + } + if (explicitAnnotationBuilder_ == null) { + result.explicitAnnotation_ = explicitAnnotation_; + } else { + result.explicitAnnotation_ = explicitAnnotationBuilder_.build(); + } + if (textAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000040) == 0x00000040)) { + textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.textAnnotations_ = textAnnotations_; + } else { + result.textAnnotations_ = textAnnotationsBuilder_.build(); + } + if (objectAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000080) == 0x00000080)) { + objectAnnotations_ = java.util.Collections.unmodifiableList(objectAnnotations_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.objectAnnotations_ = objectAnnotations_; + } else { + result.objectAnnotations_ = objectAnnotationsBuilder_.build(); + } + if (errorBuilder_ == null) { + result.error_ = error_; + } else { + result.error_ = errorBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults) { + return mergeFrom( + (com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults other) { + if (other + == com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults + .getDefaultInstance()) return this; + if (!other.getInputUri().isEmpty()) { + inputUri_ = other.inputUri_; + onChanged(); + } + if (segmentLabelAnnotationsBuilder_ == null) { + if (!other.segmentLabelAnnotations_.isEmpty()) { + if (segmentLabelAnnotations_.isEmpty()) { + segmentLabelAnnotations_ = other.segmentLabelAnnotations_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSegmentLabelAnnotationsIsMutable(); + segmentLabelAnnotations_.addAll(other.segmentLabelAnnotations_); + } + onChanged(); + } + } else { + if (!other.segmentLabelAnnotations_.isEmpty()) { + if (segmentLabelAnnotationsBuilder_.isEmpty()) { + segmentLabelAnnotationsBuilder_.dispose(); + segmentLabelAnnotationsBuilder_ = null; + segmentLabelAnnotations_ = other.segmentLabelAnnotations_; + bitField0_ = (bitField0_ & ~0x00000002); + segmentLabelAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSegmentLabelAnnotationsFieldBuilder() + : null; + } else { + segmentLabelAnnotationsBuilder_.addAllMessages(other.segmentLabelAnnotations_); + } + } + } + if (shotLabelAnnotationsBuilder_ == null) { + if (!other.shotLabelAnnotations_.isEmpty()) { + if (shotLabelAnnotations_.isEmpty()) { + shotLabelAnnotations_ = other.shotLabelAnnotations_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureShotLabelAnnotationsIsMutable(); + shotLabelAnnotations_.addAll(other.shotLabelAnnotations_); + } + onChanged(); + } + } else { + if (!other.shotLabelAnnotations_.isEmpty()) { + if (shotLabelAnnotationsBuilder_.isEmpty()) { + shotLabelAnnotationsBuilder_.dispose(); + shotLabelAnnotationsBuilder_ = null; + shotLabelAnnotations_ = other.shotLabelAnnotations_; + bitField0_ = (bitField0_ & ~0x00000004); + shotLabelAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getShotLabelAnnotationsFieldBuilder() + : null; + } else { + shotLabelAnnotationsBuilder_.addAllMessages(other.shotLabelAnnotations_); + } + } + } + if (frameLabelAnnotationsBuilder_ == null) { + if (!other.frameLabelAnnotations_.isEmpty()) { + if (frameLabelAnnotations_.isEmpty()) { + frameLabelAnnotations_ = other.frameLabelAnnotations_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureFrameLabelAnnotationsIsMutable(); + frameLabelAnnotations_.addAll(other.frameLabelAnnotations_); + } + onChanged(); + } + } else { + if (!other.frameLabelAnnotations_.isEmpty()) { + if (frameLabelAnnotationsBuilder_.isEmpty()) { + frameLabelAnnotationsBuilder_.dispose(); + frameLabelAnnotationsBuilder_ = null; + frameLabelAnnotations_ = other.frameLabelAnnotations_; + bitField0_ = (bitField0_ & ~0x00000008); + frameLabelAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFrameLabelAnnotationsFieldBuilder() + : null; + } else { + frameLabelAnnotationsBuilder_.addAllMessages(other.frameLabelAnnotations_); + } + } + } + if (shotAnnotationsBuilder_ == null) { + if (!other.shotAnnotations_.isEmpty()) { + if (shotAnnotations_.isEmpty()) { + shotAnnotations_ = other.shotAnnotations_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureShotAnnotationsIsMutable(); + shotAnnotations_.addAll(other.shotAnnotations_); + } + onChanged(); + } + } else { + if (!other.shotAnnotations_.isEmpty()) { + if (shotAnnotationsBuilder_.isEmpty()) { + shotAnnotationsBuilder_.dispose(); + shotAnnotationsBuilder_ = null; + shotAnnotations_ = other.shotAnnotations_; + bitField0_ = (bitField0_ & ~0x00000010); + shotAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getShotAnnotationsFieldBuilder() + : null; + } else { + shotAnnotationsBuilder_.addAllMessages(other.shotAnnotations_); + } + } + } + if (other.hasExplicitAnnotation()) { + mergeExplicitAnnotation(other.getExplicitAnnotation()); + } + if (textAnnotationsBuilder_ == null) { + if (!other.textAnnotations_.isEmpty()) { + if (textAnnotations_.isEmpty()) { + textAnnotations_ = other.textAnnotations_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureTextAnnotationsIsMutable(); + textAnnotations_.addAll(other.textAnnotations_); + } + onChanged(); + } + } else { + if (!other.textAnnotations_.isEmpty()) { + if (textAnnotationsBuilder_.isEmpty()) { + textAnnotationsBuilder_.dispose(); + textAnnotationsBuilder_ = null; + textAnnotations_ = other.textAnnotations_; + bitField0_ = (bitField0_ & ~0x00000040); + textAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTextAnnotationsFieldBuilder() + : null; + } else { + textAnnotationsBuilder_.addAllMessages(other.textAnnotations_); + } + } + } + if (objectAnnotationsBuilder_ == null) { + if (!other.objectAnnotations_.isEmpty()) { + if (objectAnnotations_.isEmpty()) { + objectAnnotations_ = other.objectAnnotations_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.addAll(other.objectAnnotations_); + } + onChanged(); + } + } else { + if (!other.objectAnnotations_.isEmpty()) { + if (objectAnnotationsBuilder_.isEmpty()) { + objectAnnotationsBuilder_.dispose(); + objectAnnotationsBuilder_ = null; + objectAnnotations_ = other.objectAnnotations_; + bitField0_ = (bitField0_ & ~0x00000080); + objectAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getObjectAnnotationsFieldBuilder() + : null; + } else { + objectAnnotationsBuilder_.addAllMessages(other.objectAnnotations_); + } + } + } + if (other.hasError()) { + mergeError(other.getError()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object inputUri_ = ""; + /** + * + * + *
+     * Video file location in
+     * [Google Cloud Storage](https://cloud.google.com/storage/).
+     * 
+ * + * string input_uri = 1; + */ + public java.lang.String getInputUri() { + java.lang.Object ref = inputUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + inputUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Video file location in
+     * [Google Cloud Storage](https://cloud.google.com/storage/).
+     * 
+ * + * string input_uri = 1; + */ + public com.google.protobuf.ByteString getInputUriBytes() { + java.lang.Object ref = inputUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + inputUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Video file location in
+     * [Google Cloud Storage](https://cloud.google.com/storage/).
+     * 
+ * + * string input_uri = 1; + */ + public Builder setInputUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + inputUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Video file location in
+     * [Google Cloud Storage](https://cloud.google.com/storage/).
+     * 
+ * + * string input_uri = 1; + */ + public Builder clearInputUri() { + + inputUri_ = getDefaultInstance().getInputUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Video file location in
+     * [Google Cloud Storage](https://cloud.google.com/storage/).
+     * 
+ * + * string input_uri = 1; + */ + public Builder setInputUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + inputUri_ = value; + onChanged(); + return this; + } + + private java.util.List + segmentLabelAnnotations_ = java.util.Collections.emptyList(); + + private void ensureSegmentLabelAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + segmentLabelAnnotations_ = + new java.util.ArrayList( + segmentLabelAnnotations_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder> + segmentLabelAnnotationsBuilder_; + + /** + * + * + *
+     * Label annotations on video level or user specified segment level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation segment_label_annotations = 2; + * + */ + public java.util.List + getSegmentLabelAnnotationsList() { + if (segmentLabelAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(segmentLabelAnnotations_); + } else { + return segmentLabelAnnotationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Label annotations on video level or user specified segment level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation segment_label_annotations = 2; + * + */ + public int getSegmentLabelAnnotationsCount() { + if (segmentLabelAnnotationsBuilder_ == null) { + return segmentLabelAnnotations_.size(); + } else { + return segmentLabelAnnotationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Label annotations on video level or user specified segment level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation segment_label_annotations = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation getSegmentLabelAnnotations( + int index) { + if (segmentLabelAnnotationsBuilder_ == null) { + return segmentLabelAnnotations_.get(index); + } else { + return segmentLabelAnnotationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Label annotations on video level or user specified segment level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation segment_label_annotations = 2; + * + */ + public Builder setSegmentLabelAnnotations( + int index, com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation value) { + if (segmentLabelAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSegmentLabelAnnotationsIsMutable(); + segmentLabelAnnotations_.set(index, value); + onChanged(); + } else { + segmentLabelAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Label annotations on video level or user specified segment level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation segment_label_annotations = 2; + * + */ + public Builder setSegmentLabelAnnotations( + int index, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder builderForValue) { + if (segmentLabelAnnotationsBuilder_ == null) { + ensureSegmentLabelAnnotationsIsMutable(); + segmentLabelAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + segmentLabelAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Label annotations on video level or user specified segment level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation segment_label_annotations = 2; + * + */ + public Builder addSegmentLabelAnnotations( + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation value) { + if (segmentLabelAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSegmentLabelAnnotationsIsMutable(); + segmentLabelAnnotations_.add(value); + onChanged(); + } else { + segmentLabelAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Label annotations on video level or user specified segment level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation segment_label_annotations = 2; + * + */ + public Builder addSegmentLabelAnnotations( + int index, com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation value) { + if (segmentLabelAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSegmentLabelAnnotationsIsMutable(); + segmentLabelAnnotations_.add(index, value); + onChanged(); + } else { + segmentLabelAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Label annotations on video level or user specified segment level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation segment_label_annotations = 2; + * + */ + public Builder addSegmentLabelAnnotations( + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder builderForValue) { + if (segmentLabelAnnotationsBuilder_ == null) { + ensureSegmentLabelAnnotationsIsMutable(); + segmentLabelAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + segmentLabelAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Label annotations on video level or user specified segment level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation segment_label_annotations = 2; + * + */ + public Builder addSegmentLabelAnnotations( + int index, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder builderForValue) { + if (segmentLabelAnnotationsBuilder_ == null) { + ensureSegmentLabelAnnotationsIsMutable(); + segmentLabelAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + segmentLabelAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Label annotations on video level or user specified segment level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation segment_label_annotations = 2; + * + */ + public Builder addAllSegmentLabelAnnotations( + java.lang.Iterable + values) { + if (segmentLabelAnnotationsBuilder_ == null) { + ensureSegmentLabelAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, segmentLabelAnnotations_); + onChanged(); + } else { + segmentLabelAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Label annotations on video level or user specified segment level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation segment_label_annotations = 2; + * + */ + public Builder clearSegmentLabelAnnotations() { + if (segmentLabelAnnotationsBuilder_ == null) { + segmentLabelAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + segmentLabelAnnotationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Label annotations on video level or user specified segment level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation segment_label_annotations = 2; + * + */ + public Builder removeSegmentLabelAnnotations(int index) { + if (segmentLabelAnnotationsBuilder_ == null) { + ensureSegmentLabelAnnotationsIsMutable(); + segmentLabelAnnotations_.remove(index); + onChanged(); + } else { + segmentLabelAnnotationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Label annotations on video level or user specified segment level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation segment_label_annotations = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder + getSegmentLabelAnnotationsBuilder(int index) { + return getSegmentLabelAnnotationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Label annotations on video level or user specified segment level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation segment_label_annotations = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder + getSegmentLabelAnnotationsOrBuilder(int index) { + if (segmentLabelAnnotationsBuilder_ == null) { + return segmentLabelAnnotations_.get(index); + } else { + return segmentLabelAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Label annotations on video level or user specified segment level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation segment_label_annotations = 2; + * + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder> + getSegmentLabelAnnotationsOrBuilderList() { + if (segmentLabelAnnotationsBuilder_ != null) { + return segmentLabelAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(segmentLabelAnnotations_); + } + } + /** + * + * + *
+     * Label annotations on video level or user specified segment level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation segment_label_annotations = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder + addSegmentLabelAnnotationsBuilder() { + return getSegmentLabelAnnotationsFieldBuilder() + .addBuilder( + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.getDefaultInstance()); + } + /** + * + * + *
+     * Label annotations on video level or user specified segment level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation segment_label_annotations = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder + addSegmentLabelAnnotationsBuilder(int index) { + return getSegmentLabelAnnotationsFieldBuilder() + .addBuilder( + index, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.getDefaultInstance()); + } + /** + * + * + *
+     * Label annotations on video level or user specified segment level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation segment_label_annotations = 2; + * + */ + public java.util.List + getSegmentLabelAnnotationsBuilderList() { + return getSegmentLabelAnnotationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder> + getSegmentLabelAnnotationsFieldBuilder() { + if (segmentLabelAnnotationsBuilder_ == null) { + segmentLabelAnnotationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder>( + segmentLabelAnnotations_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + segmentLabelAnnotations_ = null; + } + return segmentLabelAnnotationsBuilder_; + } + + private java.util.List + shotLabelAnnotations_ = java.util.Collections.emptyList(); + + private void ensureShotLabelAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + shotLabelAnnotations_ = + new java.util.ArrayList( + shotLabelAnnotations_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder> + shotLabelAnnotationsBuilder_; + + /** + * + * + *
+     * Label annotations on shot level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation shot_label_annotations = 3; + * + */ + public java.util.List + getShotLabelAnnotationsList() { + if (shotLabelAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(shotLabelAnnotations_); + } else { + return shotLabelAnnotationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Label annotations on shot level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation shot_label_annotations = 3; + * + */ + public int getShotLabelAnnotationsCount() { + if (shotLabelAnnotationsBuilder_ == null) { + return shotLabelAnnotations_.size(); + } else { + return shotLabelAnnotationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Label annotations on shot level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation shot_label_annotations = 3; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation getShotLabelAnnotations( + int index) { + if (shotLabelAnnotationsBuilder_ == null) { + return shotLabelAnnotations_.get(index); + } else { + return shotLabelAnnotationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Label annotations on shot level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation shot_label_annotations = 3; + * + */ + public Builder setShotLabelAnnotations( + int index, com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation value) { + if (shotLabelAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureShotLabelAnnotationsIsMutable(); + shotLabelAnnotations_.set(index, value); + onChanged(); + } else { + shotLabelAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Label annotations on shot level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation shot_label_annotations = 3; + * + */ + public Builder setShotLabelAnnotations( + int index, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder builderForValue) { + if (shotLabelAnnotationsBuilder_ == null) { + ensureShotLabelAnnotationsIsMutable(); + shotLabelAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + shotLabelAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Label annotations on shot level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation shot_label_annotations = 3; + * + */ + public Builder addShotLabelAnnotations( + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation value) { + if (shotLabelAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureShotLabelAnnotationsIsMutable(); + shotLabelAnnotations_.add(value); + onChanged(); + } else { + shotLabelAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Label annotations on shot level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation shot_label_annotations = 3; + * + */ + public Builder addShotLabelAnnotations( + int index, com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation value) { + if (shotLabelAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureShotLabelAnnotationsIsMutable(); + shotLabelAnnotations_.add(index, value); + onChanged(); + } else { + shotLabelAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Label annotations on shot level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation shot_label_annotations = 3; + * + */ + public Builder addShotLabelAnnotations( + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder builderForValue) { + if (shotLabelAnnotationsBuilder_ == null) { + ensureShotLabelAnnotationsIsMutable(); + shotLabelAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + shotLabelAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Label annotations on shot level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation shot_label_annotations = 3; + * + */ + public Builder addShotLabelAnnotations( + int index, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder builderForValue) { + if (shotLabelAnnotationsBuilder_ == null) { + ensureShotLabelAnnotationsIsMutable(); + shotLabelAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + shotLabelAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Label annotations on shot level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation shot_label_annotations = 3; + * + */ + public Builder addAllShotLabelAnnotations( + java.lang.Iterable + values) { + if (shotLabelAnnotationsBuilder_ == null) { + ensureShotLabelAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, shotLabelAnnotations_); + onChanged(); + } else { + shotLabelAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Label annotations on shot level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation shot_label_annotations = 3; + * + */ + public Builder clearShotLabelAnnotations() { + if (shotLabelAnnotationsBuilder_ == null) { + shotLabelAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + shotLabelAnnotationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Label annotations on shot level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation shot_label_annotations = 3; + * + */ + public Builder removeShotLabelAnnotations(int index) { + if (shotLabelAnnotationsBuilder_ == null) { + ensureShotLabelAnnotationsIsMutable(); + shotLabelAnnotations_.remove(index); + onChanged(); + } else { + shotLabelAnnotationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Label annotations on shot level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation shot_label_annotations = 3; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder + getShotLabelAnnotationsBuilder(int index) { + return getShotLabelAnnotationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Label annotations on shot level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation shot_label_annotations = 3; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder + getShotLabelAnnotationsOrBuilder(int index) { + if (shotLabelAnnotationsBuilder_ == null) { + return shotLabelAnnotations_.get(index); + } else { + return shotLabelAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Label annotations on shot level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation shot_label_annotations = 3; + * + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder> + getShotLabelAnnotationsOrBuilderList() { + if (shotLabelAnnotationsBuilder_ != null) { + return shotLabelAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(shotLabelAnnotations_); + } + } + /** + * + * + *
+     * Label annotations on shot level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation shot_label_annotations = 3; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder + addShotLabelAnnotationsBuilder() { + return getShotLabelAnnotationsFieldBuilder() + .addBuilder( + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.getDefaultInstance()); + } + /** + * + * + *
+     * Label annotations on shot level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation shot_label_annotations = 3; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder + addShotLabelAnnotationsBuilder(int index) { + return getShotLabelAnnotationsFieldBuilder() + .addBuilder( + index, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.getDefaultInstance()); + } + /** + * + * + *
+     * Label annotations on shot level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation shot_label_annotations = 3; + * + */ + public java.util.List + getShotLabelAnnotationsBuilderList() { + return getShotLabelAnnotationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder> + getShotLabelAnnotationsFieldBuilder() { + if (shotLabelAnnotationsBuilder_ == null) { + shotLabelAnnotationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder>( + shotLabelAnnotations_, + ((bitField0_ & 0x00000004) == 0x00000004), + getParentForChildren(), + isClean()); + shotLabelAnnotations_ = null; + } + return shotLabelAnnotationsBuilder_; + } + + private java.util.List + frameLabelAnnotations_ = java.util.Collections.emptyList(); + + private void ensureFrameLabelAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000008) == 0x00000008)) { + frameLabelAnnotations_ = + new java.util.ArrayList( + frameLabelAnnotations_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder> + frameLabelAnnotationsBuilder_; + + /** + * + * + *
+     * Label annotations on frame level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation frame_label_annotations = 4; + * + */ + public java.util.List + getFrameLabelAnnotationsList() { + if (frameLabelAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(frameLabelAnnotations_); + } else { + return frameLabelAnnotationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Label annotations on frame level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation frame_label_annotations = 4; + * + */ + public int getFrameLabelAnnotationsCount() { + if (frameLabelAnnotationsBuilder_ == null) { + return frameLabelAnnotations_.size(); + } else { + return frameLabelAnnotationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Label annotations on frame level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation frame_label_annotations = 4; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation getFrameLabelAnnotations( + int index) { + if (frameLabelAnnotationsBuilder_ == null) { + return frameLabelAnnotations_.get(index); + } else { + return frameLabelAnnotationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Label annotations on frame level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation frame_label_annotations = 4; + * + */ + public Builder setFrameLabelAnnotations( + int index, com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation value) { + if (frameLabelAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFrameLabelAnnotationsIsMutable(); + frameLabelAnnotations_.set(index, value); + onChanged(); + } else { + frameLabelAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Label annotations on frame level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation frame_label_annotations = 4; + * + */ + public Builder setFrameLabelAnnotations( + int index, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder builderForValue) { + if (frameLabelAnnotationsBuilder_ == null) { + ensureFrameLabelAnnotationsIsMutable(); + frameLabelAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + frameLabelAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Label annotations on frame level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation frame_label_annotations = 4; + * + */ + public Builder addFrameLabelAnnotations( + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation value) { + if (frameLabelAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFrameLabelAnnotationsIsMutable(); + frameLabelAnnotations_.add(value); + onChanged(); + } else { + frameLabelAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Label annotations on frame level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation frame_label_annotations = 4; + * + */ + public Builder addFrameLabelAnnotations( + int index, com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation value) { + if (frameLabelAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFrameLabelAnnotationsIsMutable(); + frameLabelAnnotations_.add(index, value); + onChanged(); + } else { + frameLabelAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Label annotations on frame level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation frame_label_annotations = 4; + * + */ + public Builder addFrameLabelAnnotations( + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder builderForValue) { + if (frameLabelAnnotationsBuilder_ == null) { + ensureFrameLabelAnnotationsIsMutable(); + frameLabelAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + frameLabelAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Label annotations on frame level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation frame_label_annotations = 4; + * + */ + public Builder addFrameLabelAnnotations( + int index, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder builderForValue) { + if (frameLabelAnnotationsBuilder_ == null) { + ensureFrameLabelAnnotationsIsMutable(); + frameLabelAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + frameLabelAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Label annotations on frame level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation frame_label_annotations = 4; + * + */ + public Builder addAllFrameLabelAnnotations( + java.lang.Iterable + values) { + if (frameLabelAnnotationsBuilder_ == null) { + ensureFrameLabelAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, frameLabelAnnotations_); + onChanged(); + } else { + frameLabelAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Label annotations on frame level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation frame_label_annotations = 4; + * + */ + public Builder clearFrameLabelAnnotations() { + if (frameLabelAnnotationsBuilder_ == null) { + frameLabelAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + frameLabelAnnotationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Label annotations on frame level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation frame_label_annotations = 4; + * + */ + public Builder removeFrameLabelAnnotations(int index) { + if (frameLabelAnnotationsBuilder_ == null) { + ensureFrameLabelAnnotationsIsMutable(); + frameLabelAnnotations_.remove(index); + onChanged(); + } else { + frameLabelAnnotationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Label annotations on frame level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation frame_label_annotations = 4; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder + getFrameLabelAnnotationsBuilder(int index) { + return getFrameLabelAnnotationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Label annotations on frame level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation frame_label_annotations = 4; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder + getFrameLabelAnnotationsOrBuilder(int index) { + if (frameLabelAnnotationsBuilder_ == null) { + return frameLabelAnnotations_.get(index); + } else { + return frameLabelAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Label annotations on frame level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation frame_label_annotations = 4; + * + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder> + getFrameLabelAnnotationsOrBuilderList() { + if (frameLabelAnnotationsBuilder_ != null) { + return frameLabelAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(frameLabelAnnotations_); + } + } + /** + * + * + *
+     * Label annotations on frame level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation frame_label_annotations = 4; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder + addFrameLabelAnnotationsBuilder() { + return getFrameLabelAnnotationsFieldBuilder() + .addBuilder( + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.getDefaultInstance()); + } + /** + * + * + *
+     * Label annotations on frame level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation frame_label_annotations = 4; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder + addFrameLabelAnnotationsBuilder(int index) { + return getFrameLabelAnnotationsFieldBuilder() + .addBuilder( + index, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.getDefaultInstance()); + } + /** + * + * + *
+     * Label annotations on frame level.
+     * There is exactly one element for each unique label.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation frame_label_annotations = 4; + * + */ + public java.util.List + getFrameLabelAnnotationsBuilderList() { + return getFrameLabelAnnotationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder> + getFrameLabelAnnotationsFieldBuilder() { + if (frameLabelAnnotationsBuilder_ == null) { + frameLabelAnnotationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation.Builder, + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder>( + frameLabelAnnotations_, + ((bitField0_ & 0x00000008) == 0x00000008), + getParentForChildren(), + isClean()); + frameLabelAnnotations_ = null; + } + return frameLabelAnnotationsBuilder_; + } + + private java.util.List + shotAnnotations_ = java.util.Collections.emptyList(); + + private void ensureShotAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000010) == 0x00000010)) { + shotAnnotations_ = + new java.util.ArrayList( + shotAnnotations_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.VideoSegment, + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder, + com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder> + shotAnnotationsBuilder_; + + /** + * + * + *
+     * Shot annotations. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 6; + * + */ + public java.util.List + getShotAnnotationsList() { + if (shotAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(shotAnnotations_); + } else { + return shotAnnotationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Shot annotations. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 6; + * + */ + public int getShotAnnotationsCount() { + if (shotAnnotationsBuilder_ == null) { + return shotAnnotations_.size(); + } else { + return shotAnnotationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Shot annotations. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 6; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegment getShotAnnotations(int index) { + if (shotAnnotationsBuilder_ == null) { + return shotAnnotations_.get(index); + } else { + return shotAnnotationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Shot annotations. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 6; + * + */ + public Builder setShotAnnotations( + int index, com.google.cloud.videointelligence.v1p3beta1.VideoSegment value) { + if (shotAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureShotAnnotationsIsMutable(); + shotAnnotations_.set(index, value); + onChanged(); + } else { + shotAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Shot annotations. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 6; + * + */ + public Builder setShotAnnotations( + int index, + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder builderForValue) { + if (shotAnnotationsBuilder_ == null) { + ensureShotAnnotationsIsMutable(); + shotAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + shotAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Shot annotations. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 6; + * + */ + public Builder addShotAnnotations( + com.google.cloud.videointelligence.v1p3beta1.VideoSegment value) { + if (shotAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureShotAnnotationsIsMutable(); + shotAnnotations_.add(value); + onChanged(); + } else { + shotAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Shot annotations. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 6; + * + */ + public Builder addShotAnnotations( + int index, com.google.cloud.videointelligence.v1p3beta1.VideoSegment value) { + if (shotAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureShotAnnotationsIsMutable(); + shotAnnotations_.add(index, value); + onChanged(); + } else { + shotAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Shot annotations. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 6; + * + */ + public Builder addShotAnnotations( + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder builderForValue) { + if (shotAnnotationsBuilder_ == null) { + ensureShotAnnotationsIsMutable(); + shotAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + shotAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Shot annotations. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 6; + * + */ + public Builder addShotAnnotations( + int index, + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder builderForValue) { + if (shotAnnotationsBuilder_ == null) { + ensureShotAnnotationsIsMutable(); + shotAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + shotAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Shot annotations. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 6; + * + */ + public Builder addAllShotAnnotations( + java.lang.Iterable + values) { + if (shotAnnotationsBuilder_ == null) { + ensureShotAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, shotAnnotations_); + onChanged(); + } else { + shotAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Shot annotations. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 6; + * + */ + public Builder clearShotAnnotations() { + if (shotAnnotationsBuilder_ == null) { + shotAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + shotAnnotationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Shot annotations. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 6; + * + */ + public Builder removeShotAnnotations(int index) { + if (shotAnnotationsBuilder_ == null) { + ensureShotAnnotationsIsMutable(); + shotAnnotations_.remove(index); + onChanged(); + } else { + shotAnnotationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Shot annotations. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 6; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder + getShotAnnotationsBuilder(int index) { + return getShotAnnotationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Shot annotations. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 6; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder + getShotAnnotationsOrBuilder(int index) { + if (shotAnnotationsBuilder_ == null) { + return shotAnnotations_.get(index); + } else { + return shotAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Shot annotations. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 6; + * + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder> + getShotAnnotationsOrBuilderList() { + if (shotAnnotationsBuilder_ != null) { + return shotAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(shotAnnotations_); + } + } + /** + * + * + *
+     * Shot annotations. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 6; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder + addShotAnnotationsBuilder() { + return getShotAnnotationsFieldBuilder() + .addBuilder( + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.getDefaultInstance()); + } + /** + * + * + *
+     * Shot annotations. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 6; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder + addShotAnnotationsBuilder(int index) { + return getShotAnnotationsFieldBuilder() + .addBuilder( + index, + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.getDefaultInstance()); + } + /** + * + * + *
+     * Shot annotations. Each shot is represented as a video segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 6; + * + */ + public java.util.List + getShotAnnotationsBuilderList() { + return getShotAnnotationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.VideoSegment, + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder, + com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder> + getShotAnnotationsFieldBuilder() { + if (shotAnnotationsBuilder_ == null) { + shotAnnotationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.VideoSegment, + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder, + com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder>( + shotAnnotations_, + ((bitField0_ & 0x00000010) == 0x00000010), + getParentForChildren(), + isClean()); + shotAnnotations_ = null; + } + return shotAnnotationsBuilder_; + } + + private com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation + explicitAnnotation_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation.Builder, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotationOrBuilder> + explicitAnnotationBuilder_; + /** + * + * + *
+     * Explicit content annotation.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation explicit_annotation = 7; + * + */ + public boolean hasExplicitAnnotation() { + return explicitAnnotationBuilder_ != null || explicitAnnotation_ != null; + } + /** + * + * + *
+     * Explicit content annotation.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation explicit_annotation = 7; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation + getExplicitAnnotation() { + if (explicitAnnotationBuilder_ == null) { + return explicitAnnotation_ == null + ? com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation + .getDefaultInstance() + : explicitAnnotation_; + } else { + return explicitAnnotationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Explicit content annotation.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation explicit_annotation = 7; + * + */ + public Builder setExplicitAnnotation( + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation value) { + if (explicitAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + explicitAnnotation_ = value; + onChanged(); + } else { + explicitAnnotationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Explicit content annotation.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation explicit_annotation = 7; + * + */ + public Builder setExplicitAnnotation( + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation.Builder + builderForValue) { + if (explicitAnnotationBuilder_ == null) { + explicitAnnotation_ = builderForValue.build(); + onChanged(); + } else { + explicitAnnotationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Explicit content annotation.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation explicit_annotation = 7; + * + */ + public Builder mergeExplicitAnnotation( + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation value) { + if (explicitAnnotationBuilder_ == null) { + if (explicitAnnotation_ != null) { + explicitAnnotation_ = + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation.newBuilder( + explicitAnnotation_) + .mergeFrom(value) + .buildPartial(); + } else { + explicitAnnotation_ = value; + } + onChanged(); + } else { + explicitAnnotationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Explicit content annotation.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation explicit_annotation = 7; + * + */ + public Builder clearExplicitAnnotation() { + if (explicitAnnotationBuilder_ == null) { + explicitAnnotation_ = null; + onChanged(); + } else { + explicitAnnotation_ = null; + explicitAnnotationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Explicit content annotation.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation explicit_annotation = 7; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation.Builder + getExplicitAnnotationBuilder() { + + onChanged(); + return getExplicitAnnotationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Explicit content annotation.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation explicit_annotation = 7; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotationOrBuilder + getExplicitAnnotationOrBuilder() { + if (explicitAnnotationBuilder_ != null) { + return explicitAnnotationBuilder_.getMessageOrBuilder(); + } else { + return explicitAnnotation_ == null + ? com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation + .getDefaultInstance() + : explicitAnnotation_; + } + } + /** + * + * + *
+     * Explicit content annotation.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation explicit_annotation = 7; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation.Builder, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotationOrBuilder> + getExplicitAnnotationFieldBuilder() { + if (explicitAnnotationBuilder_ == null) { + explicitAnnotationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation.Builder, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotationOrBuilder>( + getExplicitAnnotation(), getParentForChildren(), isClean()); + explicitAnnotation_ = null; + } + return explicitAnnotationBuilder_; + } + + private java.util.List + textAnnotations_ = java.util.Collections.emptyList(); + + private void ensureTextAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000040) == 0x00000040)) { + textAnnotations_ = + new java.util.ArrayList( + textAnnotations_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.TextAnnotation, + com.google.cloud.videointelligence.v1p3beta1.TextAnnotation.Builder, + com.google.cloud.videointelligence.v1p3beta1.TextAnnotationOrBuilder> + textAnnotationsBuilder_; + + /** + * + * + *
+     * OCR text detection and tracking.
+     * Annotations for list of detected text snippets. Each will have list of
+     * frame information associated with it.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.TextAnnotation text_annotations = 12; + * + */ + public java.util.List + getTextAnnotationsList() { + if (textAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(textAnnotations_); + } else { + return textAnnotationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * OCR text detection and tracking.
+     * Annotations for list of detected text snippets. Each will have list of
+     * frame information associated with it.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.TextAnnotation text_annotations = 12; + * + */ + public int getTextAnnotationsCount() { + if (textAnnotationsBuilder_ == null) { + return textAnnotations_.size(); + } else { + return textAnnotationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * OCR text detection and tracking.
+     * Annotations for list of detected text snippets. Each will have list of
+     * frame information associated with it.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.TextAnnotation text_annotations = 12; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.TextAnnotation getTextAnnotations( + int index) { + if (textAnnotationsBuilder_ == null) { + return textAnnotations_.get(index); + } else { + return textAnnotationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * OCR text detection and tracking.
+     * Annotations for list of detected text snippets. Each will have list of
+     * frame information associated with it.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.TextAnnotation text_annotations = 12; + * + */ + public Builder setTextAnnotations( + int index, com.google.cloud.videointelligence.v1p3beta1.TextAnnotation value) { + if (textAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextAnnotationsIsMutable(); + textAnnotations_.set(index, value); + onChanged(); + } else { + textAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * OCR text detection and tracking.
+     * Annotations for list of detected text snippets. Each will have list of
+     * frame information associated with it.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.TextAnnotation text_annotations = 12; + * + */ + public Builder setTextAnnotations( + int index, + com.google.cloud.videointelligence.v1p3beta1.TextAnnotation.Builder builderForValue) { + if (textAnnotationsBuilder_ == null) { + ensureTextAnnotationsIsMutable(); + textAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + textAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * OCR text detection and tracking.
+     * Annotations for list of detected text snippets. Each will have list of
+     * frame information associated with it.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.TextAnnotation text_annotations = 12; + * + */ + public Builder addTextAnnotations( + com.google.cloud.videointelligence.v1p3beta1.TextAnnotation value) { + if (textAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextAnnotationsIsMutable(); + textAnnotations_.add(value); + onChanged(); + } else { + textAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * OCR text detection and tracking.
+     * Annotations for list of detected text snippets. Each will have list of
+     * frame information associated with it.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.TextAnnotation text_annotations = 12; + * + */ + public Builder addTextAnnotations( + int index, com.google.cloud.videointelligence.v1p3beta1.TextAnnotation value) { + if (textAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextAnnotationsIsMutable(); + textAnnotations_.add(index, value); + onChanged(); + } else { + textAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * OCR text detection and tracking.
+     * Annotations for list of detected text snippets. Each will have list of
+     * frame information associated with it.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.TextAnnotation text_annotations = 12; + * + */ + public Builder addTextAnnotations( + com.google.cloud.videointelligence.v1p3beta1.TextAnnotation.Builder builderForValue) { + if (textAnnotationsBuilder_ == null) { + ensureTextAnnotationsIsMutable(); + textAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + textAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * OCR text detection and tracking.
+     * Annotations for list of detected text snippets. Each will have list of
+     * frame information associated with it.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.TextAnnotation text_annotations = 12; + * + */ + public Builder addTextAnnotations( + int index, + com.google.cloud.videointelligence.v1p3beta1.TextAnnotation.Builder builderForValue) { + if (textAnnotationsBuilder_ == null) { + ensureTextAnnotationsIsMutable(); + textAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + textAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * OCR text detection and tracking.
+     * Annotations for list of detected text snippets. Each will have list of
+     * frame information associated with it.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.TextAnnotation text_annotations = 12; + * + */ + public Builder addAllTextAnnotations( + java.lang.Iterable + values) { + if (textAnnotationsBuilder_ == null) { + ensureTextAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, textAnnotations_); + onChanged(); + } else { + textAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * OCR text detection and tracking.
+     * Annotations for list of detected text snippets. Each will have list of
+     * frame information associated with it.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.TextAnnotation text_annotations = 12; + * + */ + public Builder clearTextAnnotations() { + if (textAnnotationsBuilder_ == null) { + textAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + textAnnotationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * OCR text detection and tracking.
+     * Annotations for list of detected text snippets. Each will have list of
+     * frame information associated with it.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.TextAnnotation text_annotations = 12; + * + */ + public Builder removeTextAnnotations(int index) { + if (textAnnotationsBuilder_ == null) { + ensureTextAnnotationsIsMutable(); + textAnnotations_.remove(index); + onChanged(); + } else { + textAnnotationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * OCR text detection and tracking.
+     * Annotations for list of detected text snippets. Each will have list of
+     * frame information associated with it.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.TextAnnotation text_annotations = 12; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.TextAnnotation.Builder + getTextAnnotationsBuilder(int index) { + return getTextAnnotationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * OCR text detection and tracking.
+     * Annotations for list of detected text snippets. Each will have list of
+     * frame information associated with it.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.TextAnnotation text_annotations = 12; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.TextAnnotationOrBuilder + getTextAnnotationsOrBuilder(int index) { + if (textAnnotationsBuilder_ == null) { + return textAnnotations_.get(index); + } else { + return textAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * OCR text detection and tracking.
+     * Annotations for list of detected text snippets. Each will have list of
+     * frame information associated with it.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.TextAnnotation text_annotations = 12; + * + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.TextAnnotationOrBuilder> + getTextAnnotationsOrBuilderList() { + if (textAnnotationsBuilder_ != null) { + return textAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(textAnnotations_); + } + } + /** + * + * + *
+     * OCR text detection and tracking.
+     * Annotations for list of detected text snippets. Each will have list of
+     * frame information associated with it.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.TextAnnotation text_annotations = 12; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.TextAnnotation.Builder + addTextAnnotationsBuilder() { + return getTextAnnotationsFieldBuilder() + .addBuilder( + com.google.cloud.videointelligence.v1p3beta1.TextAnnotation.getDefaultInstance()); + } + /** + * + * + *
+     * OCR text detection and tracking.
+     * Annotations for list of detected text snippets. Each will have list of
+     * frame information associated with it.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.TextAnnotation text_annotations = 12; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.TextAnnotation.Builder + addTextAnnotationsBuilder(int index) { + return getTextAnnotationsFieldBuilder() + .addBuilder( + index, + com.google.cloud.videointelligence.v1p3beta1.TextAnnotation.getDefaultInstance()); + } + /** + * + * + *
+     * OCR text detection and tracking.
+     * Annotations for list of detected text snippets. Each will have list of
+     * frame information associated with it.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.TextAnnotation text_annotations = 12; + * + */ + public java.util.List + getTextAnnotationsBuilderList() { + return getTextAnnotationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.TextAnnotation, + com.google.cloud.videointelligence.v1p3beta1.TextAnnotation.Builder, + com.google.cloud.videointelligence.v1p3beta1.TextAnnotationOrBuilder> + getTextAnnotationsFieldBuilder() { + if (textAnnotationsBuilder_ == null) { + textAnnotationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.TextAnnotation, + com.google.cloud.videointelligence.v1p3beta1.TextAnnotation.Builder, + com.google.cloud.videointelligence.v1p3beta1.TextAnnotationOrBuilder>( + textAnnotations_, + ((bitField0_ & 0x00000040) == 0x00000040), + getParentForChildren(), + isClean()); + textAnnotations_ = null; + } + return textAnnotationsBuilder_; + } + + private java.util.List + objectAnnotations_ = java.util.Collections.emptyList(); + + private void ensureObjectAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000080) == 0x00000080)) { + objectAnnotations_ = + new java.util.ArrayList< + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation>( + objectAnnotations_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.Builder, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotationOrBuilder> + objectAnnotationsBuilder_; + + /** + * + * + *
+     * Annotations for list of objects detected and tracked in video.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 14; + * + */ + public java.util.List + getObjectAnnotationsList() { + if (objectAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(objectAnnotations_); + } else { + return objectAnnotationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Annotations for list of objects detected and tracked in video.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 14; + * + */ + public int getObjectAnnotationsCount() { + if (objectAnnotationsBuilder_ == null) { + return objectAnnotations_.size(); + } else { + return objectAnnotationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Annotations for list of objects detected and tracked in video.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 14; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation + getObjectAnnotations(int index) { + if (objectAnnotationsBuilder_ == null) { + return objectAnnotations_.get(index); + } else { + return objectAnnotationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Annotations for list of objects detected and tracked in video.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 14; + * + */ + public Builder setObjectAnnotations( + int index, com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation value) { + if (objectAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.set(index, value); + onChanged(); + } else { + objectAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Annotations for list of objects detected and tracked in video.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 14; + * + */ + public Builder setObjectAnnotations( + int index, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.Builder + builderForValue) { + if (objectAnnotationsBuilder_ == null) { + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + objectAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Annotations for list of objects detected and tracked in video.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 14; + * + */ + public Builder addObjectAnnotations( + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation value) { + if (objectAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.add(value); + onChanged(); + } else { + objectAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Annotations for list of objects detected and tracked in video.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 14; + * + */ + public Builder addObjectAnnotations( + int index, com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation value) { + if (objectAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.add(index, value); + onChanged(); + } else { + objectAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Annotations for list of objects detected and tracked in video.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 14; + * + */ + public Builder addObjectAnnotations( + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.Builder + builderForValue) { + if (objectAnnotationsBuilder_ == null) { + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + objectAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Annotations for list of objects detected and tracked in video.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 14; + * + */ + public Builder addObjectAnnotations( + int index, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.Builder + builderForValue) { + if (objectAnnotationsBuilder_ == null) { + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + objectAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Annotations for list of objects detected and tracked in video.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 14; + * + */ + public Builder addAllObjectAnnotations( + java.lang.Iterable< + ? extends com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation> + values) { + if (objectAnnotationsBuilder_ == null) { + ensureObjectAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, objectAnnotations_); + onChanged(); + } else { + objectAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Annotations for list of objects detected and tracked in video.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 14; + * + */ + public Builder clearObjectAnnotations() { + if (objectAnnotationsBuilder_ == null) { + objectAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + objectAnnotationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Annotations for list of objects detected and tracked in video.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 14; + * + */ + public Builder removeObjectAnnotations(int index) { + if (objectAnnotationsBuilder_ == null) { + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.remove(index); + onChanged(); + } else { + objectAnnotationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Annotations for list of objects detected and tracked in video.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 14; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.Builder + getObjectAnnotationsBuilder(int index) { + return getObjectAnnotationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Annotations for list of objects detected and tracked in video.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 14; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotationOrBuilder + getObjectAnnotationsOrBuilder(int index) { + if (objectAnnotationsBuilder_ == null) { + return objectAnnotations_.get(index); + } else { + return objectAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Annotations for list of objects detected and tracked in video.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 14; + * + */ + public java.util.List< + ? extends + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotationOrBuilder> + getObjectAnnotationsOrBuilderList() { + if (objectAnnotationsBuilder_ != null) { + return objectAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(objectAnnotations_); + } + } + /** + * + * + *
+     * Annotations for list of objects detected and tracked in video.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 14; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.Builder + addObjectAnnotationsBuilder() { + return getObjectAnnotationsFieldBuilder() + .addBuilder( + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation + .getDefaultInstance()); + } + /** + * + * + *
+     * Annotations for list of objects detected and tracked in video.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 14; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.Builder + addObjectAnnotationsBuilder(int index) { + return getObjectAnnotationsFieldBuilder() + .addBuilder( + index, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation + .getDefaultInstance()); + } + /** + * + * + *
+     * Annotations for list of objects detected and tracked in video.
+     * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 14; + * + */ + public java.util.List< + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.Builder> + getObjectAnnotationsBuilderList() { + return getObjectAnnotationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.Builder, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotationOrBuilder> + getObjectAnnotationsFieldBuilder() { + if (objectAnnotationsBuilder_ == null) { + objectAnnotationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.Builder, + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotationOrBuilder>( + objectAnnotations_, + ((bitField0_ & 0x00000080) == 0x00000080), + getParentForChildren(), + isClean()); + objectAnnotations_ = null; + } + return objectAnnotationsBuilder_; + } + + private com.google.rpc.Status error_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorBuilder_; + /** + * + * + *
+     * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
+     * some videos may succeed and some may fail.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public boolean hasError() { + return errorBuilder_ != null || error_ != null; + } + /** + * + * + *
+     * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
+     * some videos may succeed and some may fail.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
+     * some videos may succeed and some may fail.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
+     * some videos may succeed and some may fail.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public Builder setError(com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
+     * some videos may succeed and some may fail.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (error_ != null) { + error_ = com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial(); + } else { + error_ = value; + } + onChanged(); + } else { + errorBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
+     * some videos may succeed and some may fail.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + error_ = null; + onChanged(); + } else { + error_ = null; + errorBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
+     * some videos may succeed and some may fail.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
+     * some videos may succeed and some may fail.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + } + /** + * + * + *
+     * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
+     * some videos may succeed and some may fail.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getError(), getParentForChildren(), isClean()); + error_ = null; + } + return errorBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults) + private static final com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VideoAnnotationResults parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VideoAnnotationResults(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoAnnotationResultsOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoAnnotationResultsOrBuilder.java new file mode 100644 index 000000000000..16955d870503 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoAnnotationResultsOrBuilder.java @@ -0,0 +1,507 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface VideoAnnotationResultsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Video file location in
+   * [Google Cloud Storage](https://cloud.google.com/storage/).
+   * 
+ * + * string input_uri = 1; + */ + java.lang.String getInputUri(); + /** + * + * + *
+   * Video file location in
+   * [Google Cloud Storage](https://cloud.google.com/storage/).
+   * 
+ * + * string input_uri = 1; + */ + com.google.protobuf.ByteString getInputUriBytes(); + + /** + * + * + *
+   * Label annotations on video level or user specified segment level.
+   * There is exactly one element for each unique label.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation segment_label_annotations = 2; + * + */ + java.util.List + getSegmentLabelAnnotationsList(); + /** + * + * + *
+   * Label annotations on video level or user specified segment level.
+   * There is exactly one element for each unique label.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation segment_label_annotations = 2; + * + */ + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation getSegmentLabelAnnotations( + int index); + /** + * + * + *
+   * Label annotations on video level or user specified segment level.
+   * There is exactly one element for each unique label.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation segment_label_annotations = 2; + * + */ + int getSegmentLabelAnnotationsCount(); + /** + * + * + *
+   * Label annotations on video level or user specified segment level.
+   * There is exactly one element for each unique label.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation segment_label_annotations = 2; + * + */ + java.util.List + getSegmentLabelAnnotationsOrBuilderList(); + /** + * + * + *
+   * Label annotations on video level or user specified segment level.
+   * There is exactly one element for each unique label.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation segment_label_annotations = 2; + * + */ + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder + getSegmentLabelAnnotationsOrBuilder(int index); + + /** + * + * + *
+   * Label annotations on shot level.
+   * There is exactly one element for each unique label.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation shot_label_annotations = 3; + * + */ + java.util.List + getShotLabelAnnotationsList(); + /** + * + * + *
+   * Label annotations on shot level.
+   * There is exactly one element for each unique label.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation shot_label_annotations = 3; + * + */ + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation getShotLabelAnnotations(int index); + /** + * + * + *
+   * Label annotations on shot level.
+   * There is exactly one element for each unique label.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation shot_label_annotations = 3; + * + */ + int getShotLabelAnnotationsCount(); + /** + * + * + *
+   * Label annotations on shot level.
+   * There is exactly one element for each unique label.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation shot_label_annotations = 3; + * + */ + java.util.List + getShotLabelAnnotationsOrBuilderList(); + /** + * + * + *
+   * Label annotations on shot level.
+   * There is exactly one element for each unique label.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation shot_label_annotations = 3; + * + */ + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder + getShotLabelAnnotationsOrBuilder(int index); + + /** + * + * + *
+   * Label annotations on frame level.
+   * There is exactly one element for each unique label.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation frame_label_annotations = 4; + * + */ + java.util.List + getFrameLabelAnnotationsList(); + /** + * + * + *
+   * Label annotations on frame level.
+   * There is exactly one element for each unique label.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation frame_label_annotations = 4; + * + */ + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation getFrameLabelAnnotations(int index); + /** + * + * + *
+   * Label annotations on frame level.
+   * There is exactly one element for each unique label.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation frame_label_annotations = 4; + * + */ + int getFrameLabelAnnotationsCount(); + /** + * + * + *
+   * Label annotations on frame level.
+   * There is exactly one element for each unique label.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation frame_label_annotations = 4; + * + */ + java.util.List + getFrameLabelAnnotationsOrBuilderList(); + /** + * + * + *
+   * Label annotations on frame level.
+   * There is exactly one element for each unique label.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.LabelAnnotation frame_label_annotations = 4; + * + */ + com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder + getFrameLabelAnnotationsOrBuilder(int index); + + /** + * + * + *
+   * Shot annotations. Each shot is represented as a video segment.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 6; + * + */ + java.util.List + getShotAnnotationsList(); + /** + * + * + *
+   * Shot annotations. Each shot is represented as a video segment.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 6; + * + */ + com.google.cloud.videointelligence.v1p3beta1.VideoSegment getShotAnnotations(int index); + /** + * + * + *
+   * Shot annotations. Each shot is represented as a video segment.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 6; + * + */ + int getShotAnnotationsCount(); + /** + * + * + *
+   * Shot annotations. Each shot is represented as a video segment.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 6; + * + */ + java.util.List + getShotAnnotationsOrBuilderList(); + /** + * + * + *
+   * Shot annotations. Each shot is represented as a video segment.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment shot_annotations = 6; + * + */ + com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder getShotAnnotationsOrBuilder( + int index); + + /** + * + * + *
+   * Explicit content annotation.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation explicit_annotation = 7; + * + */ + boolean hasExplicitAnnotation(); + /** + * + * + *
+   * Explicit content annotation.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation explicit_annotation = 7; + * + */ + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation getExplicitAnnotation(); + /** + * + * + *
+   * Explicit content annotation.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation explicit_annotation = 7; + * + */ + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotationOrBuilder + getExplicitAnnotationOrBuilder(); + + /** + * + * + *
+   * OCR text detection and tracking.
+   * Annotations for list of detected text snippets. Each will have list of
+   * frame information associated with it.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextAnnotation text_annotations = 12; + * + */ + java.util.List + getTextAnnotationsList(); + /** + * + * + *
+   * OCR text detection and tracking.
+   * Annotations for list of detected text snippets. Each will have list of
+   * frame information associated with it.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextAnnotation text_annotations = 12; + * + */ + com.google.cloud.videointelligence.v1p3beta1.TextAnnotation getTextAnnotations(int index); + /** + * + * + *
+   * OCR text detection and tracking.
+   * Annotations for list of detected text snippets. Each will have list of
+   * frame information associated with it.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextAnnotation text_annotations = 12; + * + */ + int getTextAnnotationsCount(); + /** + * + * + *
+   * OCR text detection and tracking.
+   * Annotations for list of detected text snippets. Each will have list of
+   * frame information associated with it.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextAnnotation text_annotations = 12; + * + */ + java.util.List + getTextAnnotationsOrBuilderList(); + /** + * + * + *
+   * OCR text detection and tracking.
+   * Annotations for list of detected text snippets. Each will have list of
+   * frame information associated with it.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.TextAnnotation text_annotations = 12; + * + */ + com.google.cloud.videointelligence.v1p3beta1.TextAnnotationOrBuilder getTextAnnotationsOrBuilder( + int index); + + /** + * + * + *
+   * Annotations for list of objects detected and tracked in video.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 14; + * + */ + java.util.List + getObjectAnnotationsList(); + /** + * + * + *
+   * Annotations for list of objects detected and tracked in video.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 14; + * + */ + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation getObjectAnnotations( + int index); + /** + * + * + *
+   * Annotations for list of objects detected and tracked in video.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 14; + * + */ + int getObjectAnnotationsCount(); + /** + * + * + *
+   * Annotations for list of objects detected and tracked in video.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 14; + * + */ + java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotationOrBuilder> + getObjectAnnotationsOrBuilderList(); + /** + * + * + *
+   * Annotations for list of objects detected and tracked in video.
+   * 
+ * + * + * repeated .google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation object_annotations = 14; + * + */ + com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotationOrBuilder + getObjectAnnotationsOrBuilder(int index); + + /** + * + * + *
+   * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
+   * some videos may succeed and some may fail.
+   * 
+ * + * .google.rpc.Status error = 9; + */ + boolean hasError(); + /** + * + * + *
+   * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
+   * some videos may succeed and some may fail.
+   * 
+ * + * .google.rpc.Status error = 9; + */ + com.google.rpc.Status getError(); + /** + * + * + *
+   * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
+   * some videos may succeed and some may fail.
+   * 
+ * + * .google.rpc.Status error = 9; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoContext.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoContext.java new file mode 100644 index 000000000000..913cb876e12f --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoContext.java @@ -0,0 +1,2228 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Video context and/or feature-specific parameters.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.VideoContext} + */ +public final class VideoContext extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.VideoContext) + VideoContextOrBuilder { + private static final long serialVersionUID = 0L; + // Use VideoContext.newBuilder() to construct. + private VideoContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VideoContext() { + segments_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VideoContext( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + segments_ = + new java.util.ArrayList< + com.google.cloud.videointelligence.v1p3beta1.VideoSegment>(); + mutable_bitField0_ |= 0x00000001; + } + segments_.add( + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.parser(), + extensionRegistry)); + break; + } + case 18: + { + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig.Builder subBuilder = + null; + if (labelDetectionConfig_ != null) { + subBuilder = labelDetectionConfig_.toBuilder(); + } + labelDetectionConfig_ = + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(labelDetectionConfig_); + labelDetectionConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig.Builder + subBuilder = null; + if (shotChangeDetectionConfig_ != null) { + subBuilder = shotChangeDetectionConfig_.toBuilder(); + } + shotChangeDetectionConfig_ = + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(shotChangeDetectionConfig_); + shotChangeDetectionConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig.Builder + subBuilder = null; + if (explicitContentDetectionConfig_ != null) { + subBuilder = explicitContentDetectionConfig_.toBuilder(); + } + explicitContentDetectionConfig_ = + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(explicitContentDetectionConfig_); + explicitContentDetectionConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig.Builder subBuilder = + null; + if (textDetectionConfig_ != null) { + subBuilder = textDetectionConfig_.toBuilder(); + } + textDetectionConfig_ = + input.readMessage( + com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(textDetectionConfig_); + textDetectionConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + segments_ = java.util.Collections.unmodifiableList(segments_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_VideoContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_VideoContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.VideoContext.class, + com.google.cloud.videointelligence.v1p3beta1.VideoContext.Builder.class); + } + + private int bitField0_; + public static final int SEGMENTS_FIELD_NUMBER = 1; + private java.util.List segments_; + /** + * + * + *
+   * Video segments to annotate. The segments may overlap and are not required
+   * to be contiguous or span the whole video. If unspecified, each video is
+   * treated as a single segment.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment segments = 1; + */ + public java.util.List + getSegmentsList() { + return segments_; + } + /** + * + * + *
+   * Video segments to annotate. The segments may overlap and are not required
+   * to be contiguous or span the whole video. If unspecified, each video is
+   * treated as a single segment.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment segments = 1; + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder> + getSegmentsOrBuilderList() { + return segments_; + } + /** + * + * + *
+   * Video segments to annotate. The segments may overlap and are not required
+   * to be contiguous or span the whole video. If unspecified, each video is
+   * treated as a single segment.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment segments = 1; + */ + public int getSegmentsCount() { + return segments_.size(); + } + /** + * + * + *
+   * Video segments to annotate. The segments may overlap and are not required
+   * to be contiguous or span the whole video. If unspecified, each video is
+   * treated as a single segment.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment segments = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegment getSegments(int index) { + return segments_.get(index); + } + /** + * + * + *
+   * Video segments to annotate. The segments may overlap and are not required
+   * to be contiguous or span the whole video. If unspecified, each video is
+   * treated as a single segment.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment segments = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder getSegmentsOrBuilder( + int index) { + return segments_.get(index); + } + + public static final int LABEL_DETECTION_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig labelDetectionConfig_; + /** + * + * + *
+   * Config for LABEL_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig label_detection_config = 2; + * + */ + public boolean hasLabelDetectionConfig() { + return labelDetectionConfig_ != null; + } + /** + * + * + *
+   * Config for LABEL_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig label_detection_config = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig + getLabelDetectionConfig() { + return labelDetectionConfig_ == null + ? com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig.getDefaultInstance() + : labelDetectionConfig_; + } + /** + * + * + *
+   * Config for LABEL_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig label_detection_config = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfigOrBuilder + getLabelDetectionConfigOrBuilder() { + return getLabelDetectionConfig(); + } + + public static final int SHOT_CHANGE_DETECTION_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig + shotChangeDetectionConfig_; + /** + * + * + *
+   * Config for SHOT_CHANGE_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig shot_change_detection_config = 3; + * + */ + public boolean hasShotChangeDetectionConfig() { + return shotChangeDetectionConfig_ != null; + } + /** + * + * + *
+   * Config for SHOT_CHANGE_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig shot_change_detection_config = 3; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig + getShotChangeDetectionConfig() { + return shotChangeDetectionConfig_ == null + ? com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig + .getDefaultInstance() + : shotChangeDetectionConfig_; + } + /** + * + * + *
+   * Config for SHOT_CHANGE_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig shot_change_detection_config = 3; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfigOrBuilder + getShotChangeDetectionConfigOrBuilder() { + return getShotChangeDetectionConfig(); + } + + public static final int EXPLICIT_CONTENT_DETECTION_CONFIG_FIELD_NUMBER = 4; + private com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig + explicitContentDetectionConfig_; + /** + * + * + *
+   * Config for EXPLICIT_CONTENT_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig explicit_content_detection_config = 4; + * + */ + public boolean hasExplicitContentDetectionConfig() { + return explicitContentDetectionConfig_ != null; + } + /** + * + * + *
+   * Config for EXPLICIT_CONTENT_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig explicit_content_detection_config = 4; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig + getExplicitContentDetectionConfig() { + return explicitContentDetectionConfig_ == null + ? com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig + .getDefaultInstance() + : explicitContentDetectionConfig_; + } + /** + * + * + *
+   * Config for EXPLICIT_CONTENT_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig explicit_content_detection_config = 4; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfigOrBuilder + getExplicitContentDetectionConfigOrBuilder() { + return getExplicitContentDetectionConfig(); + } + + public static final int TEXT_DETECTION_CONFIG_FIELD_NUMBER = 8; + private com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig textDetectionConfig_; + /** + * + * + *
+   * Config for TEXT_DETECTION.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.TextDetectionConfig text_detection_config = 8; + * + */ + public boolean hasTextDetectionConfig() { + return textDetectionConfig_ != null; + } + /** + * + * + *
+   * Config for TEXT_DETECTION.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.TextDetectionConfig text_detection_config = 8; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig getTextDetectionConfig() { + return textDetectionConfig_ == null + ? com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig.getDefaultInstance() + : textDetectionConfig_; + } + /** + * + * + *
+   * Config for TEXT_DETECTION.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.TextDetectionConfig text_detection_config = 8; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfigOrBuilder + getTextDetectionConfigOrBuilder() { + return getTextDetectionConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < segments_.size(); i++) { + output.writeMessage(1, segments_.get(i)); + } + if (labelDetectionConfig_ != null) { + output.writeMessage(2, getLabelDetectionConfig()); + } + if (shotChangeDetectionConfig_ != null) { + output.writeMessage(3, getShotChangeDetectionConfig()); + } + if (explicitContentDetectionConfig_ != null) { + output.writeMessage(4, getExplicitContentDetectionConfig()); + } + if (textDetectionConfig_ != null) { + output.writeMessage(8, getTextDetectionConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < segments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, segments_.get(i)); + } + if (labelDetectionConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getLabelDetectionConfig()); + } + if (shotChangeDetectionConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, getShotChangeDetectionConfig()); + } + if (explicitContentDetectionConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, getExplicitContentDetectionConfig()); + } + if (textDetectionConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getTextDetectionConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.videointelligence.v1p3beta1.VideoContext)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.VideoContext other = + (com.google.cloud.videointelligence.v1p3beta1.VideoContext) obj; + + boolean result = true; + result = result && getSegmentsList().equals(other.getSegmentsList()); + result = result && (hasLabelDetectionConfig() == other.hasLabelDetectionConfig()); + if (hasLabelDetectionConfig()) { + result = result && getLabelDetectionConfig().equals(other.getLabelDetectionConfig()); + } + result = result && (hasShotChangeDetectionConfig() == other.hasShotChangeDetectionConfig()); + if (hasShotChangeDetectionConfig()) { + result = + result && getShotChangeDetectionConfig().equals(other.getShotChangeDetectionConfig()); + } + result = + result + && (hasExplicitContentDetectionConfig() == other.hasExplicitContentDetectionConfig()); + if (hasExplicitContentDetectionConfig()) { + result = + result + && getExplicitContentDetectionConfig() + .equals(other.getExplicitContentDetectionConfig()); + } + result = result && (hasTextDetectionConfig() == other.hasTextDetectionConfig()); + if (hasTextDetectionConfig()) { + result = result && getTextDetectionConfig().equals(other.getTextDetectionConfig()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSegmentsCount() > 0) { + hash = (37 * hash) + SEGMENTS_FIELD_NUMBER; + hash = (53 * hash) + getSegmentsList().hashCode(); + } + if (hasLabelDetectionConfig()) { + hash = (37 * hash) + LABEL_DETECTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getLabelDetectionConfig().hashCode(); + } + if (hasShotChangeDetectionConfig()) { + hash = (37 * hash) + SHOT_CHANGE_DETECTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getShotChangeDetectionConfig().hashCode(); + } + if (hasExplicitContentDetectionConfig()) { + hash = (37 * hash) + EXPLICIT_CONTENT_DETECTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getExplicitContentDetectionConfig().hashCode(); + } + if (hasTextDetectionConfig()) { + hash = (37 * hash) + TEXT_DETECTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getTextDetectionConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoContext parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoContext parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoContext parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoContext parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoContext parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoContext parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoContext parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoContext parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoContext parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoContext parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoContext parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.VideoContext prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Video context and/or feature-specific parameters.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.VideoContext} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.VideoContext) + com.google.cloud.videointelligence.v1p3beta1.VideoContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_VideoContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_VideoContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.VideoContext.class, + com.google.cloud.videointelligence.v1p3beta1.VideoContext.Builder.class); + } + + // Construct using com.google.cloud.videointelligence.v1p3beta1.VideoContext.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSegmentsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (segmentsBuilder_ == null) { + segments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + segmentsBuilder_.clear(); + } + if (labelDetectionConfigBuilder_ == null) { + labelDetectionConfig_ = null; + } else { + labelDetectionConfig_ = null; + labelDetectionConfigBuilder_ = null; + } + if (shotChangeDetectionConfigBuilder_ == null) { + shotChangeDetectionConfig_ = null; + } else { + shotChangeDetectionConfig_ = null; + shotChangeDetectionConfigBuilder_ = null; + } + if (explicitContentDetectionConfigBuilder_ == null) { + explicitContentDetectionConfig_ = null; + } else { + explicitContentDetectionConfig_ = null; + explicitContentDetectionConfigBuilder_ = null; + } + if (textDetectionConfigBuilder_ == null) { + textDetectionConfig_ = null; + } else { + textDetectionConfig_ = null; + textDetectionConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_VideoContext_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.VideoContext getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoContext.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.VideoContext build() { + com.google.cloud.videointelligence.v1p3beta1.VideoContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.VideoContext buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.VideoContext result = + new com.google.cloud.videointelligence.v1p3beta1.VideoContext(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (segmentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + segments_ = java.util.Collections.unmodifiableList(segments_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.segments_ = segments_; + } else { + result.segments_ = segmentsBuilder_.build(); + } + if (labelDetectionConfigBuilder_ == null) { + result.labelDetectionConfig_ = labelDetectionConfig_; + } else { + result.labelDetectionConfig_ = labelDetectionConfigBuilder_.build(); + } + if (shotChangeDetectionConfigBuilder_ == null) { + result.shotChangeDetectionConfig_ = shotChangeDetectionConfig_; + } else { + result.shotChangeDetectionConfig_ = shotChangeDetectionConfigBuilder_.build(); + } + if (explicitContentDetectionConfigBuilder_ == null) { + result.explicitContentDetectionConfig_ = explicitContentDetectionConfig_; + } else { + result.explicitContentDetectionConfig_ = explicitContentDetectionConfigBuilder_.build(); + } + if (textDetectionConfigBuilder_ == null) { + result.textDetectionConfig_ = textDetectionConfig_; + } else { + result.textDetectionConfig_ = textDetectionConfigBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.videointelligence.v1p3beta1.VideoContext) { + return mergeFrom((com.google.cloud.videointelligence.v1p3beta1.VideoContext) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.videointelligence.v1p3beta1.VideoContext other) { + if (other == com.google.cloud.videointelligence.v1p3beta1.VideoContext.getDefaultInstance()) + return this; + if (segmentsBuilder_ == null) { + if (!other.segments_.isEmpty()) { + if (segments_.isEmpty()) { + segments_ = other.segments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSegmentsIsMutable(); + segments_.addAll(other.segments_); + } + onChanged(); + } + } else { + if (!other.segments_.isEmpty()) { + if (segmentsBuilder_.isEmpty()) { + segmentsBuilder_.dispose(); + segmentsBuilder_ = null; + segments_ = other.segments_; + bitField0_ = (bitField0_ & ~0x00000001); + segmentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSegmentsFieldBuilder() + : null; + } else { + segmentsBuilder_.addAllMessages(other.segments_); + } + } + } + if (other.hasLabelDetectionConfig()) { + mergeLabelDetectionConfig(other.getLabelDetectionConfig()); + } + if (other.hasShotChangeDetectionConfig()) { + mergeShotChangeDetectionConfig(other.getShotChangeDetectionConfig()); + } + if (other.hasExplicitContentDetectionConfig()) { + mergeExplicitContentDetectionConfig(other.getExplicitContentDetectionConfig()); + } + if (other.hasTextDetectionConfig()) { + mergeTextDetectionConfig(other.getTextDetectionConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.VideoContext parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.VideoContext) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List segments_ = + java.util.Collections.emptyList(); + + private void ensureSegmentsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + segments_ = + new java.util.ArrayList( + segments_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.VideoSegment, + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder, + com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder> + segmentsBuilder_; + + /** + * + * + *
+     * Video segments to annotate. The segments may overlap and are not required
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment segments = 1; + */ + public java.util.List + getSegmentsList() { + if (segmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(segments_); + } else { + return segmentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Video segments to annotate. The segments may overlap and are not required
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment segments = 1; + */ + public int getSegmentsCount() { + if (segmentsBuilder_ == null) { + return segments_.size(); + } else { + return segmentsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Video segments to annotate. The segments may overlap and are not required
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment segments = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegment getSegments(int index) { + if (segmentsBuilder_ == null) { + return segments_.get(index); + } else { + return segmentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Video segments to annotate. The segments may overlap and are not required
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment segments = 1; + */ + public Builder setSegments( + int index, com.google.cloud.videointelligence.v1p3beta1.VideoSegment value) { + if (segmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSegmentsIsMutable(); + segments_.set(index, value); + onChanged(); + } else { + segmentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Video segments to annotate. The segments may overlap and are not required
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment segments = 1; + */ + public Builder setSegments( + int index, + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder builderForValue) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.set(index, builderForValue.build()); + onChanged(); + } else { + segmentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Video segments to annotate. The segments may overlap and are not required
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment segments = 1; + */ + public Builder addSegments(com.google.cloud.videointelligence.v1p3beta1.VideoSegment value) { + if (segmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSegmentsIsMutable(); + segments_.add(value); + onChanged(); + } else { + segmentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Video segments to annotate. The segments may overlap and are not required
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment segments = 1; + */ + public Builder addSegments( + int index, com.google.cloud.videointelligence.v1p3beta1.VideoSegment value) { + if (segmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSegmentsIsMutable(); + segments_.add(index, value); + onChanged(); + } else { + segmentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Video segments to annotate. The segments may overlap and are not required
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment segments = 1; + */ + public Builder addSegments( + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder builderForValue) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.add(builderForValue.build()); + onChanged(); + } else { + segmentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Video segments to annotate. The segments may overlap and are not required
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment segments = 1; + */ + public Builder addSegments( + int index, + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder builderForValue) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.add(index, builderForValue.build()); + onChanged(); + } else { + segmentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Video segments to annotate. The segments may overlap and are not required
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment segments = 1; + */ + public Builder addAllSegments( + java.lang.Iterable + values) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, segments_); + onChanged(); + } else { + segmentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Video segments to annotate. The segments may overlap and are not required
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment segments = 1; + */ + public Builder clearSegments() { + if (segmentsBuilder_ == null) { + segments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + segmentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Video segments to annotate. The segments may overlap and are not required
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment segments = 1; + */ + public Builder removeSegments(int index) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.remove(index); + onChanged(); + } else { + segmentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Video segments to annotate. The segments may overlap and are not required
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment segments = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder getSegmentsBuilder( + int index) { + return getSegmentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Video segments to annotate. The segments may overlap and are not required
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment segments = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder getSegmentsOrBuilder( + int index) { + if (segmentsBuilder_ == null) { + return segments_.get(index); + } else { + return segmentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Video segments to annotate. The segments may overlap and are not required
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment segments = 1; + */ + public java.util.List< + ? extends com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder> + getSegmentsOrBuilderList() { + if (segmentsBuilder_ != null) { + return segmentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(segments_); + } + } + /** + * + * + *
+     * Video segments to annotate. The segments may overlap and are not required
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment segments = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder addSegmentsBuilder() { + return getSegmentsFieldBuilder() + .addBuilder( + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.getDefaultInstance()); + } + /** + * + * + *
+     * Video segments to annotate. The segments may overlap and are not required
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment segments = 1; + */ + public com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder addSegmentsBuilder( + int index) { + return getSegmentsFieldBuilder() + .addBuilder( + index, + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.getDefaultInstance()); + } + /** + * + * + *
+     * Video segments to annotate. The segments may overlap and are not required
+     * to be contiguous or span the whole video. If unspecified, each video is
+     * treated as a single segment.
+     * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment segments = 1; + */ + public java.util.List + getSegmentsBuilderList() { + return getSegmentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.VideoSegment, + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder, + com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder> + getSegmentsFieldBuilder() { + if (segmentsBuilder_ == null) { + segmentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.VideoSegment, + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder, + com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder>( + segments_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + segments_ = null; + } + return segmentsBuilder_; + } + + private com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig + labelDetectionConfig_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig, + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig.Builder, + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfigOrBuilder> + labelDetectionConfigBuilder_; + /** + * + * + *
+     * Config for LABEL_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig label_detection_config = 2; + * + */ + public boolean hasLabelDetectionConfig() { + return labelDetectionConfigBuilder_ != null || labelDetectionConfig_ != null; + } + /** + * + * + *
+     * Config for LABEL_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig label_detection_config = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig + getLabelDetectionConfig() { + if (labelDetectionConfigBuilder_ == null) { + return labelDetectionConfig_ == null + ? com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig.getDefaultInstance() + : labelDetectionConfig_; + } else { + return labelDetectionConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Config for LABEL_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig label_detection_config = 2; + * + */ + public Builder setLabelDetectionConfig( + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig value) { + if (labelDetectionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + labelDetectionConfig_ = value; + onChanged(); + } else { + labelDetectionConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Config for LABEL_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig label_detection_config = 2; + * + */ + public Builder setLabelDetectionConfig( + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig.Builder builderForValue) { + if (labelDetectionConfigBuilder_ == null) { + labelDetectionConfig_ = builderForValue.build(); + onChanged(); + } else { + labelDetectionConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Config for LABEL_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig label_detection_config = 2; + * + */ + public Builder mergeLabelDetectionConfig( + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig value) { + if (labelDetectionConfigBuilder_ == null) { + if (labelDetectionConfig_ != null) { + labelDetectionConfig_ = + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig.newBuilder( + labelDetectionConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + labelDetectionConfig_ = value; + } + onChanged(); + } else { + labelDetectionConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Config for LABEL_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig label_detection_config = 2; + * + */ + public Builder clearLabelDetectionConfig() { + if (labelDetectionConfigBuilder_ == null) { + labelDetectionConfig_ = null; + onChanged(); + } else { + labelDetectionConfig_ = null; + labelDetectionConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Config for LABEL_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig label_detection_config = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig.Builder + getLabelDetectionConfigBuilder() { + + onChanged(); + return getLabelDetectionConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Config for LABEL_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig label_detection_config = 2; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfigOrBuilder + getLabelDetectionConfigOrBuilder() { + if (labelDetectionConfigBuilder_ != null) { + return labelDetectionConfigBuilder_.getMessageOrBuilder(); + } else { + return labelDetectionConfig_ == null + ? com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig.getDefaultInstance() + : labelDetectionConfig_; + } + } + /** + * + * + *
+     * Config for LABEL_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig label_detection_config = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig, + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig.Builder, + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfigOrBuilder> + getLabelDetectionConfigFieldBuilder() { + if (labelDetectionConfigBuilder_ == null) { + labelDetectionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig, + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig.Builder, + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfigOrBuilder>( + getLabelDetectionConfig(), getParentForChildren(), isClean()); + labelDetectionConfig_ = null; + } + return labelDetectionConfigBuilder_; + } + + private com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig + shotChangeDetectionConfig_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig, + com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig.Builder, + com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfigOrBuilder> + shotChangeDetectionConfigBuilder_; + /** + * + * + *
+     * Config for SHOT_CHANGE_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig shot_change_detection_config = 3; + * + */ + public boolean hasShotChangeDetectionConfig() { + return shotChangeDetectionConfigBuilder_ != null || shotChangeDetectionConfig_ != null; + } + /** + * + * + *
+     * Config for SHOT_CHANGE_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig shot_change_detection_config = 3; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig + getShotChangeDetectionConfig() { + if (shotChangeDetectionConfigBuilder_ == null) { + return shotChangeDetectionConfig_ == null + ? com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig + .getDefaultInstance() + : shotChangeDetectionConfig_; + } else { + return shotChangeDetectionConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Config for SHOT_CHANGE_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig shot_change_detection_config = 3; + * + */ + public Builder setShotChangeDetectionConfig( + com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig value) { + if (shotChangeDetectionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + shotChangeDetectionConfig_ = value; + onChanged(); + } else { + shotChangeDetectionConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Config for SHOT_CHANGE_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig shot_change_detection_config = 3; + * + */ + public Builder setShotChangeDetectionConfig( + com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig.Builder + builderForValue) { + if (shotChangeDetectionConfigBuilder_ == null) { + shotChangeDetectionConfig_ = builderForValue.build(); + onChanged(); + } else { + shotChangeDetectionConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Config for SHOT_CHANGE_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig shot_change_detection_config = 3; + * + */ + public Builder mergeShotChangeDetectionConfig( + com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig value) { + if (shotChangeDetectionConfigBuilder_ == null) { + if (shotChangeDetectionConfig_ != null) { + shotChangeDetectionConfig_ = + com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig.newBuilder( + shotChangeDetectionConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + shotChangeDetectionConfig_ = value; + } + onChanged(); + } else { + shotChangeDetectionConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Config for SHOT_CHANGE_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig shot_change_detection_config = 3; + * + */ + public Builder clearShotChangeDetectionConfig() { + if (shotChangeDetectionConfigBuilder_ == null) { + shotChangeDetectionConfig_ = null; + onChanged(); + } else { + shotChangeDetectionConfig_ = null; + shotChangeDetectionConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Config for SHOT_CHANGE_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig shot_change_detection_config = 3; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig.Builder + getShotChangeDetectionConfigBuilder() { + + onChanged(); + return getShotChangeDetectionConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Config for SHOT_CHANGE_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig shot_change_detection_config = 3; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfigOrBuilder + getShotChangeDetectionConfigOrBuilder() { + if (shotChangeDetectionConfigBuilder_ != null) { + return shotChangeDetectionConfigBuilder_.getMessageOrBuilder(); + } else { + return shotChangeDetectionConfig_ == null + ? com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig + .getDefaultInstance() + : shotChangeDetectionConfig_; + } + } + /** + * + * + *
+     * Config for SHOT_CHANGE_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig shot_change_detection_config = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig, + com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig.Builder, + com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfigOrBuilder> + getShotChangeDetectionConfigFieldBuilder() { + if (shotChangeDetectionConfigBuilder_ == null) { + shotChangeDetectionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig, + com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig.Builder, + com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfigOrBuilder>( + getShotChangeDetectionConfig(), getParentForChildren(), isClean()); + shotChangeDetectionConfig_ = null; + } + return shotChangeDetectionConfigBuilder_; + } + + private com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig + explicitContentDetectionConfig_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig.Builder, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfigOrBuilder> + explicitContentDetectionConfigBuilder_; + /** + * + * + *
+     * Config for EXPLICIT_CONTENT_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig explicit_content_detection_config = 4; + * + */ + public boolean hasExplicitContentDetectionConfig() { + return explicitContentDetectionConfigBuilder_ != null + || explicitContentDetectionConfig_ != null; + } + /** + * + * + *
+     * Config for EXPLICIT_CONTENT_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig explicit_content_detection_config = 4; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig + getExplicitContentDetectionConfig() { + if (explicitContentDetectionConfigBuilder_ == null) { + return explicitContentDetectionConfig_ == null + ? com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig + .getDefaultInstance() + : explicitContentDetectionConfig_; + } else { + return explicitContentDetectionConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Config for EXPLICIT_CONTENT_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig explicit_content_detection_config = 4; + * + */ + public Builder setExplicitContentDetectionConfig( + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig value) { + if (explicitContentDetectionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + explicitContentDetectionConfig_ = value; + onChanged(); + } else { + explicitContentDetectionConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Config for EXPLICIT_CONTENT_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig explicit_content_detection_config = 4; + * + */ + public Builder setExplicitContentDetectionConfig( + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig.Builder + builderForValue) { + if (explicitContentDetectionConfigBuilder_ == null) { + explicitContentDetectionConfig_ = builderForValue.build(); + onChanged(); + } else { + explicitContentDetectionConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Config for EXPLICIT_CONTENT_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig explicit_content_detection_config = 4; + * + */ + public Builder mergeExplicitContentDetectionConfig( + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig value) { + if (explicitContentDetectionConfigBuilder_ == null) { + if (explicitContentDetectionConfig_ != null) { + explicitContentDetectionConfig_ = + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig + .newBuilder(explicitContentDetectionConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + explicitContentDetectionConfig_ = value; + } + onChanged(); + } else { + explicitContentDetectionConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Config for EXPLICIT_CONTENT_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig explicit_content_detection_config = 4; + * + */ + public Builder clearExplicitContentDetectionConfig() { + if (explicitContentDetectionConfigBuilder_ == null) { + explicitContentDetectionConfig_ = null; + onChanged(); + } else { + explicitContentDetectionConfig_ = null; + explicitContentDetectionConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Config for EXPLICIT_CONTENT_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig explicit_content_detection_config = 4; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig.Builder + getExplicitContentDetectionConfigBuilder() { + + onChanged(); + return getExplicitContentDetectionConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Config for EXPLICIT_CONTENT_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig explicit_content_detection_config = 4; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfigOrBuilder + getExplicitContentDetectionConfigOrBuilder() { + if (explicitContentDetectionConfigBuilder_ != null) { + return explicitContentDetectionConfigBuilder_.getMessageOrBuilder(); + } else { + return explicitContentDetectionConfig_ == null + ? com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig + .getDefaultInstance() + : explicitContentDetectionConfig_; + } + } + /** + * + * + *
+     * Config for EXPLICIT_CONTENT_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig explicit_content_detection_config = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig.Builder, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfigOrBuilder> + getExplicitContentDetectionConfigFieldBuilder() { + if (explicitContentDetectionConfigBuilder_ == null) { + explicitContentDetectionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig, + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig.Builder, + com.google.cloud.videointelligence.v1p3beta1 + .ExplicitContentDetectionConfigOrBuilder>( + getExplicitContentDetectionConfig(), getParentForChildren(), isClean()); + explicitContentDetectionConfig_ = null; + } + return explicitContentDetectionConfigBuilder_; + } + + private com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig textDetectionConfig_ = + null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig, + com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig.Builder, + com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfigOrBuilder> + textDetectionConfigBuilder_; + /** + * + * + *
+     * Config for TEXT_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.TextDetectionConfig text_detection_config = 8; + * + */ + public boolean hasTextDetectionConfig() { + return textDetectionConfigBuilder_ != null || textDetectionConfig_ != null; + } + /** + * + * + *
+     * Config for TEXT_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.TextDetectionConfig text_detection_config = 8; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig + getTextDetectionConfig() { + if (textDetectionConfigBuilder_ == null) { + return textDetectionConfig_ == null + ? com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig.getDefaultInstance() + : textDetectionConfig_; + } else { + return textDetectionConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Config for TEXT_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.TextDetectionConfig text_detection_config = 8; + * + */ + public Builder setTextDetectionConfig( + com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig value) { + if (textDetectionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + textDetectionConfig_ = value; + onChanged(); + } else { + textDetectionConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Config for TEXT_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.TextDetectionConfig text_detection_config = 8; + * + */ + public Builder setTextDetectionConfig( + com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig.Builder builderForValue) { + if (textDetectionConfigBuilder_ == null) { + textDetectionConfig_ = builderForValue.build(); + onChanged(); + } else { + textDetectionConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Config for TEXT_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.TextDetectionConfig text_detection_config = 8; + * + */ + public Builder mergeTextDetectionConfig( + com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig value) { + if (textDetectionConfigBuilder_ == null) { + if (textDetectionConfig_ != null) { + textDetectionConfig_ = + com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig.newBuilder( + textDetectionConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + textDetectionConfig_ = value; + } + onChanged(); + } else { + textDetectionConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Config for TEXT_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.TextDetectionConfig text_detection_config = 8; + * + */ + public Builder clearTextDetectionConfig() { + if (textDetectionConfigBuilder_ == null) { + textDetectionConfig_ = null; + onChanged(); + } else { + textDetectionConfig_ = null; + textDetectionConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Config for TEXT_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.TextDetectionConfig text_detection_config = 8; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig.Builder + getTextDetectionConfigBuilder() { + + onChanged(); + return getTextDetectionConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Config for TEXT_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.TextDetectionConfig text_detection_config = 8; + * + */ + public com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfigOrBuilder + getTextDetectionConfigOrBuilder() { + if (textDetectionConfigBuilder_ != null) { + return textDetectionConfigBuilder_.getMessageOrBuilder(); + } else { + return textDetectionConfig_ == null + ? com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig.getDefaultInstance() + : textDetectionConfig_; + } + } + /** + * + * + *
+     * Config for TEXT_DETECTION.
+     * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.TextDetectionConfig text_detection_config = 8; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig, + com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig.Builder, + com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfigOrBuilder> + getTextDetectionConfigFieldBuilder() { + if (textDetectionConfigBuilder_ == null) { + textDetectionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig, + com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig.Builder, + com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfigOrBuilder>( + getTextDetectionConfig(), getParentForChildren(), isClean()); + textDetectionConfig_ = null; + } + return textDetectionConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.VideoContext) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.VideoContext) + private static final com.google.cloud.videointelligence.v1p3beta1.VideoContext DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.videointelligence.v1p3beta1.VideoContext(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoContext getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VideoContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VideoContext(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.VideoContext getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoContextOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoContextOrBuilder.java new file mode 100644 index 000000000000..146a1315c9a7 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoContextOrBuilder.java @@ -0,0 +1,224 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface VideoContextOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.VideoContext) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Video segments to annotate. The segments may overlap and are not required
+   * to be contiguous or span the whole video. If unspecified, each video is
+   * treated as a single segment.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment segments = 1; + */ + java.util.List getSegmentsList(); + /** + * + * + *
+   * Video segments to annotate. The segments may overlap and are not required
+   * to be contiguous or span the whole video. If unspecified, each video is
+   * treated as a single segment.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment segments = 1; + */ + com.google.cloud.videointelligence.v1p3beta1.VideoSegment getSegments(int index); + /** + * + * + *
+   * Video segments to annotate. The segments may overlap and are not required
+   * to be contiguous or span the whole video. If unspecified, each video is
+   * treated as a single segment.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment segments = 1; + */ + int getSegmentsCount(); + /** + * + * + *
+   * Video segments to annotate. The segments may overlap and are not required
+   * to be contiguous or span the whole video. If unspecified, each video is
+   * treated as a single segment.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment segments = 1; + */ + java.util.List + getSegmentsOrBuilderList(); + /** + * + * + *
+   * Video segments to annotate. The segments may overlap and are not required
+   * to be contiguous or span the whole video. If unspecified, each video is
+   * treated as a single segment.
+   * 
+ * + * repeated .google.cloud.videointelligence.v1p3beta1.VideoSegment segments = 1; + */ + com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder getSegmentsOrBuilder( + int index); + + /** + * + * + *
+   * Config for LABEL_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig label_detection_config = 2; + * + */ + boolean hasLabelDetectionConfig(); + /** + * + * + *
+   * Config for LABEL_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig label_detection_config = 2; + * + */ + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig getLabelDetectionConfig(); + /** + * + * + *
+   * Config for LABEL_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig label_detection_config = 2; + * + */ + com.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfigOrBuilder + getLabelDetectionConfigOrBuilder(); + + /** + * + * + *
+   * Config for SHOT_CHANGE_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig shot_change_detection_config = 3; + * + */ + boolean hasShotChangeDetectionConfig(); + /** + * + * + *
+   * Config for SHOT_CHANGE_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig shot_change_detection_config = 3; + * + */ + com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig + getShotChangeDetectionConfig(); + /** + * + * + *
+   * Config for SHOT_CHANGE_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig shot_change_detection_config = 3; + * + */ + com.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfigOrBuilder + getShotChangeDetectionConfigOrBuilder(); + + /** + * + * + *
+   * Config for EXPLICIT_CONTENT_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig explicit_content_detection_config = 4; + * + */ + boolean hasExplicitContentDetectionConfig(); + /** + * + * + *
+   * Config for EXPLICIT_CONTENT_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig explicit_content_detection_config = 4; + * + */ + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig + getExplicitContentDetectionConfig(); + /** + * + * + *
+   * Config for EXPLICIT_CONTENT_DETECTION.
+   * 
+ * + * + * .google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig explicit_content_detection_config = 4; + * + */ + com.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfigOrBuilder + getExplicitContentDetectionConfigOrBuilder(); + + /** + * + * + *
+   * Config for TEXT_DETECTION.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.TextDetectionConfig text_detection_config = 8; + * + */ + boolean hasTextDetectionConfig(); + /** + * + * + *
+   * Config for TEXT_DETECTION.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.TextDetectionConfig text_detection_config = 8; + * + */ + com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig getTextDetectionConfig(); + /** + * + * + *
+   * Config for TEXT_DETECTION.
+   * 
+ * + * .google.cloud.videointelligence.v1p3beta1.TextDetectionConfig text_detection_config = 8; + * + */ + com.google.cloud.videointelligence.v1p3beta1.TextDetectionConfigOrBuilder + getTextDetectionConfigOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoIntelligenceServiceProto.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoIntelligenceServiceProto.java new file mode 100644 index 000000000000..6668e7c4092b --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoIntelligenceServiceProto.java @@ -0,0 +1,665 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public final class VideoIntelligenceServiceProto { + private VideoIntelligenceServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_AnnotateVideoRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_AnnotateVideoRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_VideoContext_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_VideoContext_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_LabelDetectionConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_LabelDetectionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_ShotChangeDetectionConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_ShotChangeDetectionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_ExplicitContentDetectionConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_ExplicitContentDetectionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_TextDetectionConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_TextDetectionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_VideoSegment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_VideoSegment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_LabelSegment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_LabelSegment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_LabelFrame_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_LabelFrame_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_Entity_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_Entity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_LabelAnnotation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_LabelAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_ExplicitContentFrame_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_ExplicitContentFrame_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_ExplicitContentAnnotation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_ExplicitContentAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_NormalizedBoundingBox_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_NormalizedBoundingBox_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_VideoAnnotationResults_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_VideoAnnotationResults_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_AnnotateVideoResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_AnnotateVideoResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_VideoAnnotationProgress_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_VideoAnnotationProgress_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_AnnotateVideoProgress_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_AnnotateVideoProgress_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_NormalizedVertex_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_NormalizedVertex_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_NormalizedBoundingPoly_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_NormalizedBoundingPoly_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_TextSegment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_TextSegment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_TextFrame_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_TextFrame_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_TextAnnotation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_TextAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_ObjectTrackingFrame_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_ObjectTrackingFrame_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_ObjectTrackingAnnotation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_ObjectTrackingAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingAnnotateVideoRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingAnnotateVideoRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingAnnotateVideoResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingAnnotateVideoResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingExplicitContentDetectionConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingExplicitContentDetectionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingLabelDetectionConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingLabelDetectionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingObjectTrackingConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingObjectTrackingConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingShotChangeDetectionConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingShotChangeDetectionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingStorageConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingStorageConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingVideoAnnotationResults_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingVideoAnnotationResults_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingVideoConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingVideoConfig_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nAgoogle/cloud/videointelligence/v1p3bet" + + "a1/video_intelligence.proto\022(google.clou" + + "d.videointelligence.v1p3beta1\032\034google/ap" + + "i/annotations.proto\032#google/longrunning/" + + "operations.proto\032\036google/protobuf/durati" + + "on.proto\032\037google/protobuf/timestamp.prot" + + "o\032\027google/rpc/status.proto\"\375\001\n\024AnnotateV" + + "ideoRequest\022\021\n\tinput_uri\030\001 \001(\t\022\025\n\rinput_" + + "content\030\006 \001(\014\022C\n\010features\030\002 \003(\01621.google" + + ".cloud.videointelligence.v1p3beta1.Featu" + + "re\022M\n\rvideo_context\030\003 \001(\01326.google.cloud" + + ".videointelligence.v1p3beta1.VideoContex" + + "t\022\022\n\noutput_uri\030\004 \001(\t\022\023\n\013location_id\030\005 \001" + + "(\t\"\366\003\n\014VideoContext\022H\n\010segments\030\001 \003(\01326." + + "google.cloud.videointelligence.v1p3beta1" + + ".VideoSegment\022^\n\026label_detection_config\030" + + "\002 \001(\0132>.google.cloud.videointelligence.v" + + "1p3beta1.LabelDetectionConfig\022i\n\034shot_ch" + + "ange_detection_config\030\003 \001(\0132C.google.clo" + + "ud.videointelligence.v1p3beta1.ShotChang" + + "eDetectionConfig\022s\n!explicit_content_det" + + "ection_config\030\004 \001(\0132H.google.cloud.video" + + "intelligence.v1p3beta1.ExplicitContentDe" + + "tectionConfig\022\\\n\025text_detection_config\030\010" + + " \001(\0132=.google.cloud.videointelligence.v1" + + "p3beta1.TextDetectionConfig\"\234\001\n\024LabelDet" + + "ectionConfig\022Z\n\024label_detection_mode\030\001 \001" + + "(\0162<.google.cloud.videointelligence.v1p3" + + "beta1.LabelDetectionMode\022\031\n\021stationary_c" + + "amera\030\002 \001(\010\022\r\n\005model\030\003 \001(\t\"*\n\031ShotChange" + + "DetectionConfig\022\r\n\005model\030\001 \001(\t\"/\n\036Explic" + + "itContentDetectionConfig\022\r\n\005model\030\001 \001(\t\"" + + "-\n\023TextDetectionConfig\022\026\n\016language_hints" + + "\030\001 \003(\t\"x\n\014VideoSegment\0224\n\021start_time_off" + + "set\030\001 \001(\0132\031.google.protobuf.Duration\0222\n\017" + + "end_time_offset\030\002 \001(\0132\031.google.protobuf." + + "Duration\"k\n\014LabelSegment\022G\n\007segment\030\001 \001(" + + "\01326.google.cloud.videointelligence.v1p3b" + + "eta1.VideoSegment\022\022\n\nconfidence\030\002 \001(\002\"P\n" + + "\nLabelFrame\022.\n\013time_offset\030\001 \001(\0132\031.googl" + + "e.protobuf.Duration\022\022\n\nconfidence\030\002 \001(\002\"" + + "G\n\006Entity\022\021\n\tentity_id\030\001 \001(\t\022\023\n\013descript" + + "ion\030\002 \001(\t\022\025\n\rlanguage_code\030\003 \001(\t\"\260\002\n\017Lab" + + "elAnnotation\022@\n\006entity\030\001 \001(\01320.google.cl" + + "oud.videointelligence.v1p3beta1.Entity\022K" + + "\n\021category_entities\030\002 \003(\01320.google.cloud" + + ".videointelligence.v1p3beta1.Entity\022H\n\010s" + + "egments\030\003 \003(\01326.google.cloud.videointell" + + "igence.v1p3beta1.LabelSegment\022D\n\006frames\030" + + "\004 \003(\01324.google.cloud.videointelligence.v" + + "1p3beta1.LabelFrame\"\234\001\n\024ExplicitContentF" + + "rame\022.\n\013time_offset\030\001 \001(\0132\031.google.proto" + + "buf.Duration\022T\n\026pornography_likelihood\030\002" + + " \001(\01624.google.cloud.videointelligence.v1" + + "p3beta1.Likelihood\"k\n\031ExplicitContentAnn" + + "otation\022N\n\006frames\030\001 \003(\0132>.google.cloud.v" + + "ideointelligence.v1p3beta1.ExplicitConte" + + "ntFrame\"Q\n\025NormalizedBoundingBox\022\014\n\004left" + + "\030\001 \001(\002\022\013\n\003top\030\002 \001(\002\022\r\n\005right\030\003 \001(\002\022\016\n\006bo" + + "ttom\030\004 \001(\002\"\313\005\n\026VideoAnnotationResults\022\021\n" + + "\tinput_uri\030\001 \001(\t\022\\\n\031segment_label_annota" + + "tions\030\002 \003(\01329.google.cloud.videointellig" + + "ence.v1p3beta1.LabelAnnotation\022Y\n\026shot_l" + + "abel_annotations\030\003 \003(\01329.google.cloud.vi" + + "deointelligence.v1p3beta1.LabelAnnotatio" + + "n\022Z\n\027frame_label_annotations\030\004 \003(\01329.goo" + + "gle.cloud.videointelligence.v1p3beta1.La" + + "belAnnotation\022P\n\020shot_annotations\030\006 \003(\0132" + + "6.google.cloud.videointelligence.v1p3bet" + + "a1.VideoSegment\022`\n\023explicit_annotation\030\007" + + " \001(\0132C.google.cloud.videointelligence.v1" + + "p3beta1.ExplicitContentAnnotation\022R\n\020tex" + + "t_annotations\030\014 \003(\01328.google.cloud.video" + + "intelligence.v1p3beta1.TextAnnotation\022^\n" + + "\022object_annotations\030\016 \003(\0132B.google.cloud" + + ".videointelligence.v1p3beta1.ObjectTrack" + + "ingAnnotation\022!\n\005error\030\t \001(\0132\022.google.rp" + + "c.Status\"u\n\025AnnotateVideoResponse\022\\\n\022ann" + + "otation_results\030\001 \003(\0132@.google.cloud.vid" + + "eointelligence.v1p3beta1.VideoAnnotation" + + "Results\"\247\001\n\027VideoAnnotationProgress\022\021\n\ti" + + "nput_uri\030\001 \001(\t\022\030\n\020progress_percent\030\002 \001(\005" + + "\022.\n\nstart_time\030\003 \001(\0132\032.google.protobuf.T" + + "imestamp\022/\n\013update_time\030\004 \001(\0132\032.google.p" + + "rotobuf.Timestamp\"w\n\025AnnotateVideoProgre" + + "ss\022^\n\023annotation_progress\030\001 \003(\0132A.google" + + ".cloud.videointelligence.v1p3beta1.Video" + + "AnnotationProgress\"(\n\020NormalizedVertex\022\t" + + "\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\"f\n\026NormalizedBoundi" + + "ngPoly\022L\n\010vertices\030\001 \003(\0132:.google.cloud." + + "videointelligence.v1p3beta1.NormalizedVe" + + "rtex\"\257\001\n\013TextSegment\022G\n\007segment\030\001 \001(\01326." + + "google.cloud.videointelligence.v1p3beta1" + + ".VideoSegment\022\022\n\nconfidence\030\002 \001(\002\022C\n\006fra" + + "mes\030\003 \003(\01323.google.cloud.videointelligen" + + "ce.v1p3beta1.TextFrame\"\233\001\n\tTextFrame\022^\n\024" + + "rotated_bounding_box\030\001 \001(\0132@.google.clou" + + "d.videointelligence.v1p3beta1.Normalized" + + "BoundingPoly\022.\n\013time_offset\030\002 \001(\0132\031.goog" + + "le.protobuf.Duration\"g\n\016TextAnnotation\022\014" + + "\n\004text\030\001 \001(\t\022G\n\010segments\030\002 \003(\01325.google." + + "cloud.videointelligence.v1p3beta1.TextSe" + + "gment\"\247\001\n\023ObjectTrackingFrame\022`\n\027normali" + + "zed_bounding_box\030\001 \001(\0132?.google.cloud.vi" + + "deointelligence.v1p3beta1.NormalizedBoun" + + "dingBox\022.\n\013time_offset\030\002 \001(\0132\031.google.pr" + + "otobuf.Duration\"\254\002\n\030ObjectTrackingAnnota" + + "tion\022@\n\006entity\030\001 \001(\01320.google.cloud.vide" + + "ointelligence.v1p3beta1.Entity\022\022\n\nconfid" + + "ence\030\004 \001(\002\022M\n\006frames\030\002 \003(\0132=.google.clou" + + "d.videointelligence.v1p3beta1.ObjectTrac" + + "kingFrame\022I\n\007segment\030\003 \001(\01326.google.clou" + + "d.videointelligence.v1p3beta1.VideoSegme" + + "ntH\000\022\022\n\010track_id\030\005 \001(\003H\000B\014\n\ntrack_info\"\245" + + "\001\n\035StreamingAnnotateVideoRequest\022V\n\014vide" + + "o_config\030\001 \001(\0132>.google.cloud.videointel" + + "ligence.v1p3beta1.StreamingVideoConfigH\000" + + "\022\027\n\rinput_content\030\002 \001(\014H\000B\023\n\021streaming_r" + + "equest\"\312\001\n\036StreamingAnnotateVideoRespons" + + "e\022!\n\005error\030\001 \001(\0132\022.google.rpc.Status\022e\n\022" + + "annotation_results\030\002 \001(\0132I.google.cloud." + + "videointelligence.v1p3beta1.StreamingVid" + + "eoAnnotationResults\022\036\n\026annotation_result" + + "s_uri\030\003 \001(\t\")\n\'StreamingExplicitContentD" + + "etectionConfig\":\n\035StreamingLabelDetectio" + + "nConfig\022\031\n\021stationary_camera\030\001 \001(\010\"\037\n\035St" + + "reamingObjectTrackingConfig\"$\n\"Streaming" + + "ShotChangeDetectionConfig\"o\n\026StreamingSt" + + "orageConfig\022(\n enable_storage_annotation" + + "_result\030\001 \001(\010\022+\n#annotation_result_stora" + + "ge_directory\030\003 \001(\t\"\213\003\n\037StreamingVideoAnn" + + "otationResults\022P\n\020shot_annotations\030\001 \003(\013" + + "26.google.cloud.videointelligence.v1p3be" + + "ta1.VideoSegment\022T\n\021label_annotations\030\002 " + + "\003(\01329.google.cloud.videointelligence.v1p" + + "3beta1.LabelAnnotation\022`\n\023explicit_annot" + + "ation\030\003 \001(\0132C.google.cloud.videointellig" + + "ence.v1p3beta1.ExplicitContentAnnotation" + + "\022^\n\022object_annotations\030\004 \003(\0132B.google.cl" + + "oud.videointelligence.v1p3beta1.ObjectTr" + + "ackingAnnotation\"\235\005\n\024StreamingVideoConfi" + + "g\022K\n\007feature\030\001 \001(\0162:.google.cloud.videoi" + + "ntelligence.v1p3beta1.StreamingFeature\022t" + + "\n\034shot_change_detection_config\030\002 \001(\0132L.g" + + "oogle.cloud.videointelligence.v1p3beta1." + + "StreamingShotChangeDetectionConfigH\000\022i\n\026" + + "label_detection_config\030\003 \001(\0132G.google.cl" + + "oud.videointelligence.v1p3beta1.Streamin" + + "gLabelDetectionConfigH\000\022~\n!explicit_cont" + + "ent_detection_config\030\004 \001(\0132Q.google.clou" + + "d.videointelligence.v1p3beta1.StreamingE" + + "xplicitContentDetectionConfigH\000\022i\n\026objec" + + "t_tracking_config\030\005 \001(\0132G.google.cloud.v" + + "ideointelligence.v1p3beta1.StreamingObje" + + "ctTrackingConfigH\000\022X\n\016storage_config\030\036 \001" + + "(\0132@.google.cloud.videointelligence.v1p3" + + "beta1.StreamingStorageConfigB\022\n\020streamin" + + "g_config*\233\001\n\007Feature\022\027\n\023FEATURE_UNSPECIF" + + "IED\020\000\022\023\n\017LABEL_DETECTION\020\001\022\031\n\025SHOT_CHANG" + + "E_DETECTION\020\002\022\036\n\032EXPLICIT_CONTENT_DETECT" + + "ION\020\003\022\022\n\016TEXT_DETECTION\020\007\022\023\n\017OBJECT_TRAC" + + "KING\020\t*r\n\022LabelDetectionMode\022$\n LABEL_DE" + + "TECTION_MODE_UNSPECIFIED\020\000\022\r\n\tSHOT_MODE\020" + + "\001\022\016\n\nFRAME_MODE\020\002\022\027\n\023SHOT_AND_FRAME_MODE" + + "\020\003*t\n\nLikelihood\022\032\n\026LIKELIHOOD_UNSPECIFI" + + "ED\020\000\022\021\n\rVERY_UNLIKELY\020\001\022\014\n\010UNLIKELY\020\002\022\014\n" + + "\010POSSIBLE\020\003\022\n\n\006LIKELY\020\004\022\017\n\013VERY_LIKELY\020\005" + + "*\302\001\n\020StreamingFeature\022!\n\035STREAMING_FEATU" + + "RE_UNSPECIFIED\020\000\022\035\n\031STREAMING_LABEL_DETE" + + "CTION\020\001\022#\n\037STREAMING_SHOT_CHANGE_DETECTI" + + "ON\020\002\022(\n$STREAMING_EXPLICIT_CONTENT_DETEC" + + "TION\020\003\022\035\n\031STREAMING_OBJECT_TRACKING\020\0042\262\001" + + "\n\030VideoIntelligenceService\022\225\001\n\rAnnotateV" + + "ideo\022>.google.cloud.videointelligence.v1" + + "p3beta1.AnnotateVideoRequest\032\035.google.lo" + + "ngrunning.Operation\"%\202\323\344\223\002\037\"\032/v1p3beta1/" + + "videos:annotate:\001*2\325\001\n!StreamingVideoInt" + + "elligenceService\022\257\001\n\026StreamingAnnotateVi" + + "deo\022G.google.cloud.videointelligence.v1p" + + "3beta1.StreamingAnnotateVideoRequest\032H.g" + + "oogle.cloud.videointelligence.v1p3beta1." + + "StreamingAnnotateVideoResponse(\0010\001B\200\002\n,c" + + "om.google.cloud.videointelligence.v1p3be" + + "ta1B\035VideoIntelligenceServiceProtoP\001ZYgo" + + "ogle.golang.org/genproto/googleapis/clou" + + "d/videointelligence/v1p3beta1;videointel" + + "ligence\252\002(Google.Cloud.VideoIntelligence" + + ".V1P3Beta1\312\002(Google\\Cloud\\VideoIntellige" + + "nce\\V1p3beta1b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + }, + assigner); + internal_static_google_cloud_videointelligence_v1p3beta1_AnnotateVideoRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_videointelligence_v1p3beta1_AnnotateVideoRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_AnnotateVideoRequest_descriptor, + new java.lang.String[] { + "InputUri", "InputContent", "Features", "VideoContext", "OutputUri", "LocationId", + }); + internal_static_google_cloud_videointelligence_v1p3beta1_VideoContext_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_videointelligence_v1p3beta1_VideoContext_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_VideoContext_descriptor, + new java.lang.String[] { + "Segments", + "LabelDetectionConfig", + "ShotChangeDetectionConfig", + "ExplicitContentDetectionConfig", + "TextDetectionConfig", + }); + internal_static_google_cloud_videointelligence_v1p3beta1_LabelDetectionConfig_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_videointelligence_v1p3beta1_LabelDetectionConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_LabelDetectionConfig_descriptor, + new java.lang.String[] { + "LabelDetectionMode", "StationaryCamera", "Model", + }); + internal_static_google_cloud_videointelligence_v1p3beta1_ShotChangeDetectionConfig_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_videointelligence_v1p3beta1_ShotChangeDetectionConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_ShotChangeDetectionConfig_descriptor, + new java.lang.String[] { + "Model", + }); + internal_static_google_cloud_videointelligence_v1p3beta1_ExplicitContentDetectionConfig_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_videointelligence_v1p3beta1_ExplicitContentDetectionConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_ExplicitContentDetectionConfig_descriptor, + new java.lang.String[] { + "Model", + }); + internal_static_google_cloud_videointelligence_v1p3beta1_TextDetectionConfig_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_videointelligence_v1p3beta1_TextDetectionConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_TextDetectionConfig_descriptor, + new java.lang.String[] { + "LanguageHints", + }); + internal_static_google_cloud_videointelligence_v1p3beta1_VideoSegment_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_videointelligence_v1p3beta1_VideoSegment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_VideoSegment_descriptor, + new java.lang.String[] { + "StartTimeOffset", "EndTimeOffset", + }); + internal_static_google_cloud_videointelligence_v1p3beta1_LabelSegment_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_videointelligence_v1p3beta1_LabelSegment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_LabelSegment_descriptor, + new java.lang.String[] { + "Segment", "Confidence", + }); + internal_static_google_cloud_videointelligence_v1p3beta1_LabelFrame_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_videointelligence_v1p3beta1_LabelFrame_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_LabelFrame_descriptor, + new java.lang.String[] { + "TimeOffset", "Confidence", + }); + internal_static_google_cloud_videointelligence_v1p3beta1_Entity_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_videointelligence_v1p3beta1_Entity_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_Entity_descriptor, + new java.lang.String[] { + "EntityId", "Description", "LanguageCode", + }); + internal_static_google_cloud_videointelligence_v1p3beta1_LabelAnnotation_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_videointelligence_v1p3beta1_LabelAnnotation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_LabelAnnotation_descriptor, + new java.lang.String[] { + "Entity", "CategoryEntities", "Segments", "Frames", + }); + internal_static_google_cloud_videointelligence_v1p3beta1_ExplicitContentFrame_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_videointelligence_v1p3beta1_ExplicitContentFrame_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_ExplicitContentFrame_descriptor, + new java.lang.String[] { + "TimeOffset", "PornographyLikelihood", + }); + internal_static_google_cloud_videointelligence_v1p3beta1_ExplicitContentAnnotation_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_videointelligence_v1p3beta1_ExplicitContentAnnotation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_ExplicitContentAnnotation_descriptor, + new java.lang.String[] { + "Frames", + }); + internal_static_google_cloud_videointelligence_v1p3beta1_NormalizedBoundingBox_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_videointelligence_v1p3beta1_NormalizedBoundingBox_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_NormalizedBoundingBox_descriptor, + new java.lang.String[] { + "Left", "Top", "Right", "Bottom", + }); + internal_static_google_cloud_videointelligence_v1p3beta1_VideoAnnotationResults_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_videointelligence_v1p3beta1_VideoAnnotationResults_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_VideoAnnotationResults_descriptor, + new java.lang.String[] { + "InputUri", + "SegmentLabelAnnotations", + "ShotLabelAnnotations", + "FrameLabelAnnotations", + "ShotAnnotations", + "ExplicitAnnotation", + "TextAnnotations", + "ObjectAnnotations", + "Error", + }); + internal_static_google_cloud_videointelligence_v1p3beta1_AnnotateVideoResponse_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_videointelligence_v1p3beta1_AnnotateVideoResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_AnnotateVideoResponse_descriptor, + new java.lang.String[] { + "AnnotationResults", + }); + internal_static_google_cloud_videointelligence_v1p3beta1_VideoAnnotationProgress_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_videointelligence_v1p3beta1_VideoAnnotationProgress_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_VideoAnnotationProgress_descriptor, + new java.lang.String[] { + "InputUri", "ProgressPercent", "StartTime", "UpdateTime", + }); + internal_static_google_cloud_videointelligence_v1p3beta1_AnnotateVideoProgress_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_videointelligence_v1p3beta1_AnnotateVideoProgress_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_AnnotateVideoProgress_descriptor, + new java.lang.String[] { + "AnnotationProgress", + }); + internal_static_google_cloud_videointelligence_v1p3beta1_NormalizedVertex_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_videointelligence_v1p3beta1_NormalizedVertex_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_NormalizedVertex_descriptor, + new java.lang.String[] { + "X", "Y", + }); + internal_static_google_cloud_videointelligence_v1p3beta1_NormalizedBoundingPoly_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_videointelligence_v1p3beta1_NormalizedBoundingPoly_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_NormalizedBoundingPoly_descriptor, + new java.lang.String[] { + "Vertices", + }); + internal_static_google_cloud_videointelligence_v1p3beta1_TextSegment_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_videointelligence_v1p3beta1_TextSegment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_TextSegment_descriptor, + new java.lang.String[] { + "Segment", "Confidence", "Frames", + }); + internal_static_google_cloud_videointelligence_v1p3beta1_TextFrame_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_videointelligence_v1p3beta1_TextFrame_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_TextFrame_descriptor, + new java.lang.String[] { + "RotatedBoundingBox", "TimeOffset", + }); + internal_static_google_cloud_videointelligence_v1p3beta1_TextAnnotation_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_videointelligence_v1p3beta1_TextAnnotation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_TextAnnotation_descriptor, + new java.lang.String[] { + "Text", "Segments", + }); + internal_static_google_cloud_videointelligence_v1p3beta1_ObjectTrackingFrame_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_cloud_videointelligence_v1p3beta1_ObjectTrackingFrame_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_ObjectTrackingFrame_descriptor, + new java.lang.String[] { + "NormalizedBoundingBox", "TimeOffset", + }); + internal_static_google_cloud_videointelligence_v1p3beta1_ObjectTrackingAnnotation_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_cloud_videointelligence_v1p3beta1_ObjectTrackingAnnotation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_ObjectTrackingAnnotation_descriptor, + new java.lang.String[] { + "Entity", "Confidence", "Frames", "Segment", "TrackId", "TrackInfo", + }); + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingAnnotateVideoRequest_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingAnnotateVideoRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingAnnotateVideoRequest_descriptor, + new java.lang.String[] { + "VideoConfig", "InputContent", "StreamingRequest", + }); + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingAnnotateVideoResponse_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingAnnotateVideoResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingAnnotateVideoResponse_descriptor, + new java.lang.String[] { + "Error", "AnnotationResults", "AnnotationResultsUri", + }); + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingExplicitContentDetectionConfig_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingExplicitContentDetectionConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingExplicitContentDetectionConfig_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingLabelDetectionConfig_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingLabelDetectionConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingLabelDetectionConfig_descriptor, + new java.lang.String[] { + "StationaryCamera", + }); + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingObjectTrackingConfig_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingObjectTrackingConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingObjectTrackingConfig_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingShotChangeDetectionConfig_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingShotChangeDetectionConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingShotChangeDetectionConfig_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingStorageConfig_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingStorageConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingStorageConfig_descriptor, + new java.lang.String[] { + "EnableStorageAnnotationResult", "AnnotationResultStorageDirectory", + }); + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingVideoAnnotationResults_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingVideoAnnotationResults_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingVideoAnnotationResults_descriptor, + new java.lang.String[] { + "ShotAnnotations", "LabelAnnotations", "ExplicitAnnotation", "ObjectAnnotations", + }); + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingVideoConfig_descriptor = + getDescriptor().getMessageTypes().get(33); + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingVideoConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_videointelligence_v1p3beta1_StreamingVideoConfig_descriptor, + new java.lang.String[] { + "Feature", + "ShotChangeDetectionConfig", + "LabelDetectionConfig", + "ExplicitContentDetectionConfig", + "ObjectTrackingConfig", + "StorageConfig", + "StreamingConfig", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.AnnotationsProto.http); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoSegment.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoSegment.java new file mode 100644 index 000000000000..7d7b76592b7d --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoSegment.java @@ -0,0 +1,992 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +/** + * + * + *
+ * Video segment.
+ * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.VideoSegment} + */ +public final class VideoSegment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p3beta1.VideoSegment) + VideoSegmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use VideoSegment.newBuilder() to construct. + private VideoSegment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VideoSegment() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VideoSegment( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (startTimeOffset_ != null) { + subBuilder = startTimeOffset_.toBuilder(); + } + startTimeOffset_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTimeOffset_); + startTimeOffset_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (endTimeOffset_ != null) { + subBuilder = endTimeOffset_.toBuilder(); + } + endTimeOffset_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTimeOffset_); + endTimeOffset_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_VideoSegment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_VideoSegment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.class, + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder.class); + } + + public static final int START_TIME_OFFSET_FIELD_NUMBER = 1; + private com.google.protobuf.Duration startTimeOffset_; + /** + * + * + *
+   * Time-offset, relative to the beginning of the video,
+   * corresponding to the start of the segment (inclusive).
+   * 
+ * + * .google.protobuf.Duration start_time_offset = 1; + */ + public boolean hasStartTimeOffset() { + return startTimeOffset_ != null; + } + /** + * + * + *
+   * Time-offset, relative to the beginning of the video,
+   * corresponding to the start of the segment (inclusive).
+   * 
+ * + * .google.protobuf.Duration start_time_offset = 1; + */ + public com.google.protobuf.Duration getStartTimeOffset() { + return startTimeOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startTimeOffset_; + } + /** + * + * + *
+   * Time-offset, relative to the beginning of the video,
+   * corresponding to the start of the segment (inclusive).
+   * 
+ * + * .google.protobuf.Duration start_time_offset = 1; + */ + public com.google.protobuf.DurationOrBuilder getStartTimeOffsetOrBuilder() { + return getStartTimeOffset(); + } + + public static final int END_TIME_OFFSET_FIELD_NUMBER = 2; + private com.google.protobuf.Duration endTimeOffset_; + /** + * + * + *
+   * Time-offset, relative to the beginning of the video,
+   * corresponding to the end of the segment (inclusive).
+   * 
+ * + * .google.protobuf.Duration end_time_offset = 2; + */ + public boolean hasEndTimeOffset() { + return endTimeOffset_ != null; + } + /** + * + * + *
+   * Time-offset, relative to the beginning of the video,
+   * corresponding to the end of the segment (inclusive).
+   * 
+ * + * .google.protobuf.Duration end_time_offset = 2; + */ + public com.google.protobuf.Duration getEndTimeOffset() { + return endTimeOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endTimeOffset_; + } + /** + * + * + *
+   * Time-offset, relative to the beginning of the video,
+   * corresponding to the end of the segment (inclusive).
+   * 
+ * + * .google.protobuf.Duration end_time_offset = 2; + */ + public com.google.protobuf.DurationOrBuilder getEndTimeOffsetOrBuilder() { + return getEndTimeOffset(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (startTimeOffset_ != null) { + output.writeMessage(1, getStartTimeOffset()); + } + if (endTimeOffset_ != null) { + output.writeMessage(2, getEndTimeOffset()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (startTimeOffset_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTimeOffset()); + } + if (endTimeOffset_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTimeOffset()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.videointelligence.v1p3beta1.VideoSegment)) { + return super.equals(obj); + } + com.google.cloud.videointelligence.v1p3beta1.VideoSegment other = + (com.google.cloud.videointelligence.v1p3beta1.VideoSegment) obj; + + boolean result = true; + result = result && (hasStartTimeOffset() == other.hasStartTimeOffset()); + if (hasStartTimeOffset()) { + result = result && getStartTimeOffset().equals(other.getStartTimeOffset()); + } + result = result && (hasEndTimeOffset() == other.hasEndTimeOffset()); + if (hasEndTimeOffset()) { + result = result && getEndTimeOffset().equals(other.getEndTimeOffset()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStartTimeOffset()) { + hash = (37 * hash) + START_TIME_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getStartTimeOffset().hashCode(); + } + if (hasEndTimeOffset()) { + hash = (37 * hash) + END_TIME_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getEndTimeOffset().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoSegment parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoSegment parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoSegment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoSegment parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoSegment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoSegment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoSegment parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoSegment parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoSegment parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoSegment parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoSegment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoSegment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.videointelligence.v1p3beta1.VideoSegment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Video segment.
+   * 
+ * + * Protobuf type {@code google.cloud.videointelligence.v1p3beta1.VideoSegment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p3beta1.VideoSegment) + com.google.cloud.videointelligence.v1p3beta1.VideoSegmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_VideoSegment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_VideoSegment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.class, + com.google.cloud.videointelligence.v1p3beta1.VideoSegment.Builder.class); + } + + // Construct using com.google.cloud.videointelligence.v1p3beta1.VideoSegment.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (startTimeOffsetBuilder_ == null) { + startTimeOffset_ = null; + } else { + startTimeOffset_ = null; + startTimeOffsetBuilder_ = null; + } + if (endTimeOffsetBuilder_ == null) { + endTimeOffset_ = null; + } else { + endTimeOffset_ = null; + endTimeOffsetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceProto + .internal_static_google_cloud_videointelligence_v1p3beta1_VideoSegment_descriptor; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.VideoSegment getDefaultInstanceForType() { + return com.google.cloud.videointelligence.v1p3beta1.VideoSegment.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.VideoSegment build() { + com.google.cloud.videointelligence.v1p3beta1.VideoSegment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.VideoSegment buildPartial() { + com.google.cloud.videointelligence.v1p3beta1.VideoSegment result = + new com.google.cloud.videointelligence.v1p3beta1.VideoSegment(this); + if (startTimeOffsetBuilder_ == null) { + result.startTimeOffset_ = startTimeOffset_; + } else { + result.startTimeOffset_ = startTimeOffsetBuilder_.build(); + } + if (endTimeOffsetBuilder_ == null) { + result.endTimeOffset_ = endTimeOffset_; + } else { + result.endTimeOffset_ = endTimeOffsetBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.videointelligence.v1p3beta1.VideoSegment) { + return mergeFrom((com.google.cloud.videointelligence.v1p3beta1.VideoSegment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.videointelligence.v1p3beta1.VideoSegment other) { + if (other == com.google.cloud.videointelligence.v1p3beta1.VideoSegment.getDefaultInstance()) + return this; + if (other.hasStartTimeOffset()) { + mergeStartTimeOffset(other.getStartTimeOffset()); + } + if (other.hasEndTimeOffset()) { + mergeEndTimeOffset(other.getEndTimeOffset()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.videointelligence.v1p3beta1.VideoSegment parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.videointelligence.v1p3beta1.VideoSegment) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Duration startTimeOffset_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + startTimeOffsetBuilder_; + /** + * + * + *
+     * Time-offset, relative to the beginning of the video,
+     * corresponding to the start of the segment (inclusive).
+     * 
+ * + * .google.protobuf.Duration start_time_offset = 1; + */ + public boolean hasStartTimeOffset() { + return startTimeOffsetBuilder_ != null || startTimeOffset_ != null; + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video,
+     * corresponding to the start of the segment (inclusive).
+     * 
+ * + * .google.protobuf.Duration start_time_offset = 1; + */ + public com.google.protobuf.Duration getStartTimeOffset() { + if (startTimeOffsetBuilder_ == null) { + return startTimeOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startTimeOffset_; + } else { + return startTimeOffsetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video,
+     * corresponding to the start of the segment (inclusive).
+     * 
+ * + * .google.protobuf.Duration start_time_offset = 1; + */ + public Builder setStartTimeOffset(com.google.protobuf.Duration value) { + if (startTimeOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTimeOffset_ = value; + onChanged(); + } else { + startTimeOffsetBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video,
+     * corresponding to the start of the segment (inclusive).
+     * 
+ * + * .google.protobuf.Duration start_time_offset = 1; + */ + public Builder setStartTimeOffset(com.google.protobuf.Duration.Builder builderForValue) { + if (startTimeOffsetBuilder_ == null) { + startTimeOffset_ = builderForValue.build(); + onChanged(); + } else { + startTimeOffsetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video,
+     * corresponding to the start of the segment (inclusive).
+     * 
+ * + * .google.protobuf.Duration start_time_offset = 1; + */ + public Builder mergeStartTimeOffset(com.google.protobuf.Duration value) { + if (startTimeOffsetBuilder_ == null) { + if (startTimeOffset_ != null) { + startTimeOffset_ = + com.google.protobuf.Duration.newBuilder(startTimeOffset_) + .mergeFrom(value) + .buildPartial(); + } else { + startTimeOffset_ = value; + } + onChanged(); + } else { + startTimeOffsetBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video,
+     * corresponding to the start of the segment (inclusive).
+     * 
+ * + * .google.protobuf.Duration start_time_offset = 1; + */ + public Builder clearStartTimeOffset() { + if (startTimeOffsetBuilder_ == null) { + startTimeOffset_ = null; + onChanged(); + } else { + startTimeOffset_ = null; + startTimeOffsetBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video,
+     * corresponding to the start of the segment (inclusive).
+     * 
+ * + * .google.protobuf.Duration start_time_offset = 1; + */ + public com.google.protobuf.Duration.Builder getStartTimeOffsetBuilder() { + + onChanged(); + return getStartTimeOffsetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video,
+     * corresponding to the start of the segment (inclusive).
+     * 
+ * + * .google.protobuf.Duration start_time_offset = 1; + */ + public com.google.protobuf.DurationOrBuilder getStartTimeOffsetOrBuilder() { + if (startTimeOffsetBuilder_ != null) { + return startTimeOffsetBuilder_.getMessageOrBuilder(); + } else { + return startTimeOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startTimeOffset_; + } + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video,
+     * corresponding to the start of the segment (inclusive).
+     * 
+ * + * .google.protobuf.Duration start_time_offset = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getStartTimeOffsetFieldBuilder() { + if (startTimeOffsetBuilder_ == null) { + startTimeOffsetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getStartTimeOffset(), getParentForChildren(), isClean()); + startTimeOffset_ = null; + } + return startTimeOffsetBuilder_; + } + + private com.google.protobuf.Duration endTimeOffset_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + endTimeOffsetBuilder_; + /** + * + * + *
+     * Time-offset, relative to the beginning of the video,
+     * corresponding to the end of the segment (inclusive).
+     * 
+ * + * .google.protobuf.Duration end_time_offset = 2; + */ + public boolean hasEndTimeOffset() { + return endTimeOffsetBuilder_ != null || endTimeOffset_ != null; + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video,
+     * corresponding to the end of the segment (inclusive).
+     * 
+ * + * .google.protobuf.Duration end_time_offset = 2; + */ + public com.google.protobuf.Duration getEndTimeOffset() { + if (endTimeOffsetBuilder_ == null) { + return endTimeOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endTimeOffset_; + } else { + return endTimeOffsetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video,
+     * corresponding to the end of the segment (inclusive).
+     * 
+ * + * .google.protobuf.Duration end_time_offset = 2; + */ + public Builder setEndTimeOffset(com.google.protobuf.Duration value) { + if (endTimeOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTimeOffset_ = value; + onChanged(); + } else { + endTimeOffsetBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video,
+     * corresponding to the end of the segment (inclusive).
+     * 
+ * + * .google.protobuf.Duration end_time_offset = 2; + */ + public Builder setEndTimeOffset(com.google.protobuf.Duration.Builder builderForValue) { + if (endTimeOffsetBuilder_ == null) { + endTimeOffset_ = builderForValue.build(); + onChanged(); + } else { + endTimeOffsetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video,
+     * corresponding to the end of the segment (inclusive).
+     * 
+ * + * .google.protobuf.Duration end_time_offset = 2; + */ + public Builder mergeEndTimeOffset(com.google.protobuf.Duration value) { + if (endTimeOffsetBuilder_ == null) { + if (endTimeOffset_ != null) { + endTimeOffset_ = + com.google.protobuf.Duration.newBuilder(endTimeOffset_) + .mergeFrom(value) + .buildPartial(); + } else { + endTimeOffset_ = value; + } + onChanged(); + } else { + endTimeOffsetBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video,
+     * corresponding to the end of the segment (inclusive).
+     * 
+ * + * .google.protobuf.Duration end_time_offset = 2; + */ + public Builder clearEndTimeOffset() { + if (endTimeOffsetBuilder_ == null) { + endTimeOffset_ = null; + onChanged(); + } else { + endTimeOffset_ = null; + endTimeOffsetBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video,
+     * corresponding to the end of the segment (inclusive).
+     * 
+ * + * .google.protobuf.Duration end_time_offset = 2; + */ + public com.google.protobuf.Duration.Builder getEndTimeOffsetBuilder() { + + onChanged(); + return getEndTimeOffsetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video,
+     * corresponding to the end of the segment (inclusive).
+     * 
+ * + * .google.protobuf.Duration end_time_offset = 2; + */ + public com.google.protobuf.DurationOrBuilder getEndTimeOffsetOrBuilder() { + if (endTimeOffsetBuilder_ != null) { + return endTimeOffsetBuilder_.getMessageOrBuilder(); + } else { + return endTimeOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endTimeOffset_; + } + } + /** + * + * + *
+     * Time-offset, relative to the beginning of the video,
+     * corresponding to the end of the segment (inclusive).
+     * 
+ * + * .google.protobuf.Duration end_time_offset = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getEndTimeOffsetFieldBuilder() { + if (endTimeOffsetBuilder_ == null) { + endTimeOffsetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getEndTimeOffset(), getParentForChildren(), isClean()); + endTimeOffset_ = null; + } + return endTimeOffsetBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.videointelligence.v1p3beta1.VideoSegment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p3beta1.VideoSegment) + private static final com.google.cloud.videointelligence.v1p3beta1.VideoSegment DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.videointelligence.v1p3beta1.VideoSegment(); + } + + public static com.google.cloud.videointelligence.v1p3beta1.VideoSegment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VideoSegment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VideoSegment(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.videointelligence.v1p3beta1.VideoSegment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoSegmentOrBuilder.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoSegmentOrBuilder.java new file mode 100644 index 000000000000..058457fa9992 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoSegmentOrBuilder.java @@ -0,0 +1,78 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +package com.google.cloud.videointelligence.v1p3beta1; + +public interface VideoSegmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.videointelligence.v1p3beta1.VideoSegment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Time-offset, relative to the beginning of the video,
+   * corresponding to the start of the segment (inclusive).
+   * 
+ * + * .google.protobuf.Duration start_time_offset = 1; + */ + boolean hasStartTimeOffset(); + /** + * + * + *
+   * Time-offset, relative to the beginning of the video,
+   * corresponding to the start of the segment (inclusive).
+   * 
+ * + * .google.protobuf.Duration start_time_offset = 1; + */ + com.google.protobuf.Duration getStartTimeOffset(); + /** + * + * + *
+   * Time-offset, relative to the beginning of the video,
+   * corresponding to the start of the segment (inclusive).
+   * 
+ * + * .google.protobuf.Duration start_time_offset = 1; + */ + com.google.protobuf.DurationOrBuilder getStartTimeOffsetOrBuilder(); + + /** + * + * + *
+   * Time-offset, relative to the beginning of the video,
+   * corresponding to the end of the segment (inclusive).
+   * 
+ * + * .google.protobuf.Duration end_time_offset = 2; + */ + boolean hasEndTimeOffset(); + /** + * + * + *
+   * Time-offset, relative to the beginning of the video,
+   * corresponding to the end of the segment (inclusive).
+   * 
+ * + * .google.protobuf.Duration end_time_offset = 2; + */ + com.google.protobuf.Duration getEndTimeOffset(); + /** + * + * + *
+   * Time-offset, relative to the beginning of the video,
+   * corresponding to the end of the segment (inclusive).
+   * 
+ * + * .google.protobuf.Duration end_time_offset = 2; + */ + com.google.protobuf.DurationOrBuilder getEndTimeOffsetOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/proto/google/cloud/videointelligence/v1p3beta1/video_intelligence.proto b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/proto/google/cloud/videointelligence/v1p3beta1/video_intelligence.proto new file mode 100644 index 000000000000..dc65a651e78c --- /dev/null +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/proto/google/cloud/videointelligence/v1p3beta1/video_intelligence.proto @@ -0,0 +1,627 @@ +// Copyright 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.videointelligence.v1p3beta1; + +import "google/api/annotations.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.VideoIntelligence.V1P3Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/videointelligence/v1p3beta1;videointelligence"; +option java_multiple_files = true; +option java_outer_classname = "VideoIntelligenceServiceProto"; +option java_package = "com.google.cloud.videointelligence.v1p3beta1"; +option php_namespace = "Google\\Cloud\\VideoIntelligence\\V1p3beta1"; + +// Service that implements Google Cloud Video Intelligence API. +service VideoIntelligenceService { + // Performs asynchronous video annotation. Progress and results can be + // retrieved through the `google.longrunning.Operations` interface. + // `Operation.metadata` contains `AnnotateVideoProgress` (progress). + // `Operation.response` contains `AnnotateVideoResponse` (results). + rpc AnnotateVideo(AnnotateVideoRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1p3beta1/videos:annotate" + body: "*" + }; + } +} + +// Service that implements Google Cloud Video Intelligence Streaming API. +service StreamingVideoIntelligenceService { + // Performs video annotation with bidirectional streaming: emitting results + // while sending video/audio bytes. + // This method is only available via the gRPC API (not REST). + rpc StreamingAnnotateVideo(stream StreamingAnnotateVideoRequest) + returns (stream StreamingAnnotateVideoResponse); +} + +// Video annotation request. +message AnnotateVideoRequest { + // Input video location. Currently, only + // [Google Cloud Storage](https://cloud.google.com/storage/) URIs are + // supported, which must be specified in the following format: + // `gs://bucket-id/object-id` (other URI formats return + // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + // more information, see [Request URIs](/storage/docs/reference-uris). A video + // URI may include wildcards in `object-id`, and thus identify multiple + // videos. Supported wildcards: '*' to match 0 or more characters; + // '?' to match 1 character. If unset, the input video should be embedded + // in the request as `input_content`. If set, `input_content` should be unset. + string input_uri = 1; + + // The video data bytes. + // If unset, the input video(s) should be specified via `input_uri`. + // If set, `input_uri` should be unset. + bytes input_content = 6; + + // Requested video annotation features. + repeated Feature features = 2; + + // Additional video context and/or feature-specific parameters. + VideoContext video_context = 3; + + // Optional location where the output (in JSON format) should be stored. + // Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) + // URIs are supported, which must be specified in the following format: + // `gs://bucket-id/object-id` (other URI formats return + // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + // more information, see [Request URIs](/storage/docs/reference-uris). + string output_uri = 4; + + // Optional cloud region where annotation should take place. Supported cloud + // regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region + // is specified, a region will be determined based on video file location. + string location_id = 5; +} + +// Video context and/or feature-specific parameters. +message VideoContext { + // Video segments to annotate. The segments may overlap and are not required + // to be contiguous or span the whole video. If unspecified, each video is + // treated as a single segment. + repeated VideoSegment segments = 1; + + // Config for LABEL_DETECTION. + LabelDetectionConfig label_detection_config = 2; + + // Config for SHOT_CHANGE_DETECTION. + ShotChangeDetectionConfig shot_change_detection_config = 3; + + // Config for EXPLICIT_CONTENT_DETECTION. + ExplicitContentDetectionConfig explicit_content_detection_config = 4; + + // Config for TEXT_DETECTION. + TextDetectionConfig text_detection_config = 8; +} + +// Config for LABEL_DETECTION. +message LabelDetectionConfig { + // What labels should be detected with LABEL_DETECTION, in addition to + // video-level labels or segment-level labels. + // If unspecified, defaults to `SHOT_MODE`. + LabelDetectionMode label_detection_mode = 1; + + // Whether the video has been shot from a stationary (i.e. non-moving) camera. + // When set to true, might improve detection accuracy for moving objects. + // Should be used with `SHOT_AND_FRAME_MODE` enabled. + bool stationary_camera = 2; + + // Model to use for label detection. + // Supported values: "builtin/stable" (the default if unset) and + // "builtin/latest". + string model = 3; +} + +// Config for SHOT_CHANGE_DETECTION. +message ShotChangeDetectionConfig { + // Model to use for shot change detection. + // Supported values: "builtin/stable" (the default if unset) and + // "builtin/latest". + string model = 1; +} + +// Config for EXPLICIT_CONTENT_DETECTION. +message ExplicitContentDetectionConfig { + // Model to use for explicit content detection. + // Supported values: "builtin/stable" (the default if unset) and + // "builtin/latest". + string model = 1; +} + +// Config for TEXT_DETECTION. +message TextDetectionConfig { + // Language hint can be specified if the language to be detected is known a + // priori. It can increase the accuracy of the detection. Language hint must + // be language code in BCP-47 format. + // + // Automatic language detection is performed if no hint is provided. + repeated string language_hints = 1; +} + +// Video segment. +message VideoSegment { + // Time-offset, relative to the beginning of the video, + // corresponding to the start of the segment (inclusive). + google.protobuf.Duration start_time_offset = 1; + + // Time-offset, relative to the beginning of the video, + // corresponding to the end of the segment (inclusive). + google.protobuf.Duration end_time_offset = 2; +} + +// Video segment level annotation results for label detection. +message LabelSegment { + // Video segment where a label was detected. + VideoSegment segment = 1; + + // Confidence that the label is accurate. Range: [0, 1]. + float confidence = 2; +} + +// Video frame level annotation results for label detection. +message LabelFrame { + // Time-offset, relative to the beginning of the video, corresponding to the + // video frame for this location. + google.protobuf.Duration time_offset = 1; + + // Confidence that the label is accurate. Range: [0, 1]. + float confidence = 2; +} + +// Detected entity from video analysis. +message Entity { + // Opaque entity ID. Some IDs may be available in + // [Google Knowledge Graph Search + // API](https://developers.google.com/knowledge-graph/). + string entity_id = 1; + + // Textual description, e.g. `Fixed-gear bicycle`. + string description = 2; + + // Language code for `description` in BCP-47 format. + string language_code = 3; +} + +// Label annotation. +message LabelAnnotation { + // Detected entity. + Entity entity = 1; + + // Common categories for the detected entity. + // E.g. when the label is `Terrier` the category is likely `dog`. And in some + // cases there might be more than one categories e.g. `Terrier` could also be + // a `pet`. + repeated Entity category_entities = 2; + + // All video segments where a label was detected. + repeated LabelSegment segments = 3; + + // All video frames where a label was detected. + repeated LabelFrame frames = 4; +} + +// Video frame level annotation results for explicit content. +message ExplicitContentFrame { + // Time-offset, relative to the beginning of the video, corresponding to the + // video frame for this location. + google.protobuf.Duration time_offset = 1; + + // Likelihood of the pornography content.. + Likelihood pornography_likelihood = 2; +} + +// Explicit content annotation (based on per-frame visual signals only). +// If no explicit content has been detected in a frame, no annotations are +// present for that frame. +message ExplicitContentAnnotation { + // All video frames where explicit content was detected. + repeated ExplicitContentFrame frames = 1; +} + +// Normalized bounding box. +// The normalized vertex coordinates are relative to the original image. +// Range: [0, 1]. +message NormalizedBoundingBox { + // Left X coordinate. + float left = 1; + + // Top Y coordinate. + float top = 2; + + // Right X coordinate. + float right = 3; + + // Bottom Y coordinate. + float bottom = 4; +} + +// Annotation results for a single video. +message VideoAnnotationResults { + // Video file location in + // [Google Cloud Storage](https://cloud.google.com/storage/). + string input_uri = 1; + + // Label annotations on video level or user specified segment level. + // There is exactly one element for each unique label. + repeated LabelAnnotation segment_label_annotations = 2; + + // Label annotations on shot level. + // There is exactly one element for each unique label. + repeated LabelAnnotation shot_label_annotations = 3; + + // Label annotations on frame level. + // There is exactly one element for each unique label. + repeated LabelAnnotation frame_label_annotations = 4; + + // Shot annotations. Each shot is represented as a video segment. + repeated VideoSegment shot_annotations = 6; + + // Explicit content annotation. + ExplicitContentAnnotation explicit_annotation = 7; + + // OCR text detection and tracking. + // Annotations for list of detected text snippets. Each will have list of + // frame information associated with it. + repeated TextAnnotation text_annotations = 12; + + // Annotations for list of objects detected and tracked in video. + repeated ObjectTrackingAnnotation object_annotations = 14; + + // If set, indicates an error. Note that for a single `AnnotateVideoRequest` + // some videos may succeed and some may fail. + google.rpc.Status error = 9; +} + +// Video annotation response. Included in the `response` +// field of the `Operation` returned by the `GetOperation` +// call of the `google::longrunning::Operations` service. +message AnnotateVideoResponse { + // Annotation results for all videos specified in `AnnotateVideoRequest`. + repeated VideoAnnotationResults annotation_results = 1; +} + +// Annotation progress for a single video. +message VideoAnnotationProgress { + // Video file location in + // [Google Cloud Storage](https://cloud.google.com/storage/). + string input_uri = 1; + + // Approximate percentage processed thus far. Guaranteed to be + // 100 when fully processed. + int32 progress_percent = 2; + + // Time when the request was received. + google.protobuf.Timestamp start_time = 3; + + // Time of the most recent update. + google.protobuf.Timestamp update_time = 4; +} + +// Video annotation progress. Included in the `metadata` +// field of the `Operation` returned by the `GetOperation` +// call of the `google::longrunning::Operations` service. +message AnnotateVideoProgress { + // Progress metadata for all videos specified in `AnnotateVideoRequest`. + repeated VideoAnnotationProgress annotation_progress = 1; +} + +// A vertex represents a 2D point in the image. +// NOTE: the normalized vertex coordinates are relative to the original image +// and range from 0 to 1. +message NormalizedVertex { + // X coordinate. + float x = 1; + + // Y coordinate. + float y = 2; +} + +// Normalized bounding polygon for text (that might not be aligned with axis). +// Contains list of the corner points in clockwise order starting from +// top-left corner. For example, for a rectangular bounding box: +// When the text is horizontal it might look like: +// 0----1 +// | | +// 3----2 +// +// When it's clockwise rotated 180 degrees around the top-left corner it +// becomes: +// 2----3 +// | | +// 1----0 +// +// and the vertex order will still be (0, 1, 2, 3). Note that values can be less +// than 0, or greater than 1 due to trignometric calculations for location of +// the box. +message NormalizedBoundingPoly { + // Normalized vertices of the bounding polygon. + repeated NormalizedVertex vertices = 1; +} + +// Video segment level annotation results for text detection. +message TextSegment { + // Video segment where a text snippet was detected. + VideoSegment segment = 1; + + // Confidence for the track of detected text. It is calculated as the highest + // over all frames where OCR detected text appears. + float confidence = 2; + + // Information related to the frames where OCR detected text appears. + repeated TextFrame frames = 3; +} + +// Video frame level annotation results for text annotation (OCR). +// Contains information regarding timestamp and bounding box locations for the +// frames containing detected OCR text snippets. +message TextFrame { + // Bounding polygon of the detected text for this frame. + NormalizedBoundingPoly rotated_bounding_box = 1; + + // Timestamp of this frame. + google.protobuf.Duration time_offset = 2; +} + +// Annotations related to one detected OCR text snippet. This will contain the +// corresponding text, confidence value, and frame level information for each +// detection. +message TextAnnotation { + // The detected text. + string text = 1; + + // All video segments where OCR detected text appears. + repeated TextSegment segments = 2; +} + +// Video frame level annotations for object detection and tracking. This field +// stores per frame location, time offset, and confidence. +message ObjectTrackingFrame { + // The normalized bounding box location of this object track for the frame. + NormalizedBoundingBox normalized_bounding_box = 1; + + // The timestamp of the frame in microseconds. + google.protobuf.Duration time_offset = 2; +} + +// Annotations corresponding to one tracked object. +message ObjectTrackingAnnotation { + // Entity to specify the object category that this track is labeled as. + Entity entity = 1; + + // Object category's labeling confidence of this track. + float confidence = 4; + + // Information corresponding to all frames where this object track appears. + // Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame + // messages in frames. + // Streaming mode: it can only be one ObjectTrackingFrame message in frames. + repeated ObjectTrackingFrame frames = 2; + + // Different representation of tracking info in non-streaming batch + // and streaming modes. + oneof track_info { + // Non-streaming batch mode ONLY. + // Each object track corresponds to one video segment where it appears. + VideoSegment segment = 3; + // Streaming mode ONLY. + // In streaming mode, we do not know the end time of a tracked object + // before it is completed. Hence, there is no VideoSegment info returned. + // Instead, we provide a unique identifiable integer track_id so that + // the customers can correlate the results of the ongoing + // ObjectTrackAnnotation of the same track_id over time. + int64 track_id = 5; + } +} + +// The top-level message sent by the client for the `StreamingAnnotateVideo` +// method. Multiple `StreamingAnnotateVideoRequest` messages are sent. +// The first message must only contain a `StreamingVideoConfig` message. +// All subsequent messages must only contain `input_content` data. +message StreamingAnnotateVideoRequest { + // *Required* The streaming request, which is either a streaming config or + // video content. + oneof streaming_request { + // Provides information to the annotator, specifing how to process the + // request. The first `AnnotateStreamingVideoRequest` message must only + // contain a `video_config` message. + StreamingVideoConfig video_config = 1; + + // The video data to be annotated. Chunks of video data are sequentially + // sent in `StreamingAnnotateVideoRequest` messages. Except the initial + // `StreamingAnnotateVideoRequest` message containing only + // `video_config`, all subsequent `AnnotateStreamingVideoRequest` + // messages must only contain `input_content` field. + bytes input_content = 2; + } +} + +// `StreamingAnnotateVideoResponse` is the only message returned to the client +// by `StreamingAnnotateVideo`. A series of zero or more +// `StreamingAnnotateVideoResponse` messages are streamed back to the client. +message StreamingAnnotateVideoResponse { + // If set, returns a [google.rpc.Status][] message that + // specifies the error for the operation. + google.rpc.Status error = 1; + + // Streaming annotation results. + StreamingVideoAnnotationResults annotation_results = 2; + + // GCS URI that stores annotation results of one streaming session. + // It is a directory that can hold multiple files in JSON format. + // Example uri format: + // gs://bucket_id/object_id/cloud_project_name-session_id + string annotation_results_uri = 3; +} + +// Config for EXPLICIT_CONTENT_DETECTION in streaming mode. +message StreamingExplicitContentDetectionConfig { + // No customized config support. +} + +// Config for LABEL_DETECTION in streaming mode. +message StreamingLabelDetectionConfig { + // Whether the video has been captured from a stationary (i.e. non-moving) + // camera. When set to true, might improve detection accuracy for moving + // objects. Default: false. + bool stationary_camera = 1; +} + +// Config for STREAMING_OBJECT_TRACKING. +message StreamingObjectTrackingConfig { + // No customized config support. +} + +// Config for SHOT_CHANGE_DETECTION in streaming mode. +message StreamingShotChangeDetectionConfig { + // No customized config support. +} + +// Config for streaming storage option. +message StreamingStorageConfig { + // Enable streaming storage. Default: false. + bool enable_storage_annotation_result = 1; + + // GCS URI to store all annotation results for one client. Client should + // specify this field as the top-level storage directory. Annotation results + // of different sessions will be put into different sub-directories denoted + // by project_name and session_id. All sub-directories will be auto generated + // by program and will be made accessible to client in response proto. + // URIs must be specified in the following format: `gs://bucket-id/object-id` + // `bucket-id` should be a valid GCS bucket created by client and bucket + // permission shall also be configured properly. `object-id` can be arbitrary + // string that make sense to client. Other URI formats will return error and + // cause GCS write failure. + string annotation_result_storage_directory = 3; +} + +// Streaming annotation results corresponding to a portion of the video +// that is currently being processed. +message StreamingVideoAnnotationResults { + // Shot annotation results. Each shot is represented as a video segment. + repeated VideoSegment shot_annotations = 1; + + // Label annotation results. + repeated LabelAnnotation label_annotations = 2; + + // Explicit content detection results. + ExplicitContentAnnotation explicit_annotation = 3; + + // Object tracking results. + repeated ObjectTrackingAnnotation object_annotations = 4; +} + +// Provides information to the annotator that specifies how to process the +// request. +message StreamingVideoConfig { + // Requested annotation feature. + StreamingFeature feature = 1; + + // Config for requested annotation feature. + oneof streaming_config { + // Config for SHOT_CHANGE_DETECTION. + StreamingShotChangeDetectionConfig shot_change_detection_config = 2; + + // Config for LABEL_DETECTION. + StreamingLabelDetectionConfig label_detection_config = 3; + + // Config for STREAMING_EXPLICIT_CONTENT_DETECTION. + StreamingExplicitContentDetectionConfig explicit_content_detection_config = + 4; + + // Config for STREAMING_OBJECT_TRACKING. + StreamingObjectTrackingConfig object_tracking_config = 5; + } + + // Streaming storage option. By default: storage is disabled. + StreamingStorageConfig storage_config = 30; +} + +// Video annotation feature. +enum Feature { + // Unspecified. + FEATURE_UNSPECIFIED = 0; + + // Label detection. Detect objects, such as dog or flower. + LABEL_DETECTION = 1; + + // Shot change detection. + SHOT_CHANGE_DETECTION = 2; + + // Explicit content detection. + EXPLICIT_CONTENT_DETECTION = 3; + + // OCR text detection and tracking. + TEXT_DETECTION = 7; + + // Object detection and tracking. + OBJECT_TRACKING = 9; +} + +// Label detection mode. +enum LabelDetectionMode { + // Unspecified. + LABEL_DETECTION_MODE_UNSPECIFIED = 0; + + // Detect shot-level labels. + SHOT_MODE = 1; + + // Detect frame-level labels. + FRAME_MODE = 2; + + // Detect both shot-level and frame-level labels. + SHOT_AND_FRAME_MODE = 3; +} + +// Bucketized representation of likelihood. +enum Likelihood { + // Unspecified likelihood. + LIKELIHOOD_UNSPECIFIED = 0; + + // Very unlikely. + VERY_UNLIKELY = 1; + + // Unlikely. + UNLIKELY = 2; + + // Possible. + POSSIBLE = 3; + + // Likely. + LIKELY = 4; + + // Very likely. + VERY_LIKELY = 5; +} + +// Streaming video annotation feature. +enum StreamingFeature { + // Unspecified. + STREAMING_FEATURE_UNSPECIFIED = 0; + // Label detection. Detect objects, such as dog or flower. + STREAMING_LABEL_DETECTION = 1; + // Shot change detection. + STREAMING_SHOT_CHANGE_DETECTION = 2; + // Explicit content detection. + STREAMING_EXPLICIT_CONTENT_DETECTION = 3; + // Object detection and tracking. + STREAMING_OBJECT_TRACKING = 4; +} diff --git a/google-cloud-bom/pom.xml b/google-cloud-bom/pom.xml index 8fcad29f6697..bad21c38538a 100644 --- a/google-cloud-bom/pom.xml +++ b/google-cloud-bom/pom.xml @@ -915,6 +915,16 @@ grpc-google-cloud-video-intelligence-v1p2beta1 0.48.1-SNAPSHOT
+ + com.google.api.grpc + proto-google-cloud-video-intelligence-v1p3beta1 + 0.48.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-video-intelligence-v1p3beta1 + 0.48.1-SNAPSHOT + com.google.api.grpc proto-google-cloud-iot-v1 diff --git a/google-cloud-clients/google-cloud-video-intelligence/pom.xml b/google-cloud-clients/google-cloud-video-intelligence/pom.xml index 932cd74870b2..e7edc3c3ab9b 100644 --- a/google-cloud-clients/google-cloud-video-intelligence/pom.xml +++ b/google-cloud-clients/google-cloud-video-intelligence/pom.xml @@ -46,6 +46,10 @@ com.google.api.grpc proto-google-cloud-video-intelligence-v1p2beta1 + + com.google.api.grpc + proto-google-cloud-video-intelligence-v1p3beta1 + io.grpc grpc-netty-shaded @@ -96,6 +100,11 @@ grpc-google-cloud-video-intelligence-v1p2beta1 test + + com.google.api.grpc + grpc-google-cloud-video-intelligence-v1p3beta1 + test + com.google.api diff --git a/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoIntelligenceServiceClient.java b/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoIntelligenceServiceClient.java new file mode 100644 index 000000000000..7fe7b85ac590 --- /dev/null +++ b/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoIntelligenceServiceClient.java @@ -0,0 +1,209 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.videointelligence.v1p3beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.cloud.videointelligence.v1p3beta1.stub.StreamingVideoIntelligenceServiceStub; +import com.google.cloud.videointelligence.v1p3beta1.stub.StreamingVideoIntelligenceServiceStubSettings; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND SERVICE +/** + * Service Description: Service that implements Google Cloud Video Intelligence Streaming API. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

+ * 
+ * try (StreamingVideoIntelligenceServiceClient streamingVideoIntelligenceServiceClient = StreamingVideoIntelligenceServiceClient.create()) {
+ *   StreamingAnnotateVideoRequest request = StreamingAnnotateVideoRequest.newBuilder().build();
+ *   ApiFuture<StreamingAnnotateVideoResponse> future = streamingVideoIntelligenceServiceClient.streamingAnnotateVideoCallable().futureCall(request);
+ *   // Do something
+ *   StreamingAnnotateVideoResponse response = future.get();
+ * }
+ * 
+ * 
+ * + *

Note: close() needs to be called on the streamingVideoIntelligenceServiceClient object to + * clean up resources such as threads. In the example above, try-with-resources is used, which + * automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of + * StreamingVideoIntelligenceServiceSettings to create(). For example: + * + *

To customize credentials: + * + *

+ * 
+ * StreamingVideoIntelligenceServiceSettings streamingVideoIntelligenceServiceSettings =
+ *     StreamingVideoIntelligenceServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * StreamingVideoIntelligenceServiceClient streamingVideoIntelligenceServiceClient =
+ *     StreamingVideoIntelligenceServiceClient.create(streamingVideoIntelligenceServiceSettings);
+ * 
+ * 
+ * + * To customize the endpoint: + * + *
+ * 
+ * StreamingVideoIntelligenceServiceSettings streamingVideoIntelligenceServiceSettings =
+ *     StreamingVideoIntelligenceServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * StreamingVideoIntelligenceServiceClient streamingVideoIntelligenceServiceClient =
+ *     StreamingVideoIntelligenceServiceClient.create(streamingVideoIntelligenceServiceSettings);
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class StreamingVideoIntelligenceServiceClient implements BackgroundResource { + private final StreamingVideoIntelligenceServiceSettings settings; + private final StreamingVideoIntelligenceServiceStub stub; + + /** Constructs an instance of StreamingVideoIntelligenceServiceClient with default settings. */ + public static final StreamingVideoIntelligenceServiceClient create() throws IOException { + return create(StreamingVideoIntelligenceServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of StreamingVideoIntelligenceServiceClient, using the given settings. + * The channels are created based on the settings passed in, or defaults for any settings that are + * not set. + */ + public static final StreamingVideoIntelligenceServiceClient create( + StreamingVideoIntelligenceServiceSettings settings) throws IOException { + return new StreamingVideoIntelligenceServiceClient(settings); + } + + /** + * Constructs an instance of StreamingVideoIntelligenceServiceClient, using the given stub for + * making calls. This is for advanced usage - prefer to use + * StreamingVideoIntelligenceServiceSettings}. + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final StreamingVideoIntelligenceServiceClient create( + StreamingVideoIntelligenceServiceStub stub) { + return new StreamingVideoIntelligenceServiceClient(stub); + } + + /** + * Constructs an instance of StreamingVideoIntelligenceServiceClient, using the given settings. + * This is protected so that it is easy to make a subclass, but otherwise, the static factory + * methods should be preferred. + */ + protected StreamingVideoIntelligenceServiceClient( + StreamingVideoIntelligenceServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = + ((StreamingVideoIntelligenceServiceStubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected StreamingVideoIntelligenceServiceClient(StreamingVideoIntelligenceServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final StreamingVideoIntelligenceServiceSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public StreamingVideoIntelligenceServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Performs video annotation with bidirectional streaming: emitting results while sending + * video/audio bytes. This method is only available via the gRPC API (not REST). + * + *

Sample code: + * + *


+   * try (StreamingVideoIntelligenceServiceClient streamingVideoIntelligenceServiceClient = StreamingVideoIntelligenceServiceClient.create()) {
+   *   BidiStream<StreamingAnnotateVideoRequest, StreamingAnnotateVideoResponse> bidiStream =
+   *       streamingVideoIntelligenceServiceClient.streamingAnnotateVideoCallable().call();
+   *
+   *   StreamingAnnotateVideoRequest request = StreamingAnnotateVideoRequest.newBuilder().build();
+   *   bidiStream.send(request);
+   *   for (StreamingAnnotateVideoResponse response : bidiStream) {
+   *     // Do something when receive a response
+   *   }
+   * }
+   * 
+ */ + public final BidiStreamingCallable + streamingAnnotateVideoCallable() { + return stub.streamingAnnotateVideoCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoIntelligenceServiceSettings.java b/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoIntelligenceServiceSettings.java new file mode 100644 index 000000000000..f35d9b1e95df --- /dev/null +++ b/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoIntelligenceServiceSettings.java @@ -0,0 +1,182 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.videointelligence.v1p3beta1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.videointelligence.v1p3beta1.stub.StreamingVideoIntelligenceServiceStubSettings; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link StreamingVideoIntelligenceServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (videointelligence.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. For + * example, to set the total timeout of streamingAnnotateVideoCallable to 30 seconds: + * + *

+ * 
+ * StreamingVideoIntelligenceServiceSettings.Builder streamingVideoIntelligenceServiceSettingsBuilder =
+ *     StreamingVideoIntelligenceServiceSettings.newBuilder();
+ * streamingVideoIntelligenceServiceSettingsBuilder.streamingAnnotateVideoSettings().getRetrySettings().toBuilder()
+ *     .setTotalTimeout(Duration.ofSeconds(30));
+ * StreamingVideoIntelligenceServiceSettings streamingVideoIntelligenceServiceSettings = streamingVideoIntelligenceServiceSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class StreamingVideoIntelligenceServiceSettings + extends ClientSettings { + /** Returns the object with the settings used for calls to streamingAnnotateVideo. */ + public StreamingCallSettings + streamingAnnotateVideoSettings() { + return ((StreamingVideoIntelligenceServiceStubSettings) getStubSettings()) + .streamingAnnotateVideoSettings(); + } + + public static final StreamingVideoIntelligenceServiceSettings create( + StreamingVideoIntelligenceServiceStubSettings stub) throws IOException { + return new StreamingVideoIntelligenceServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return StreamingVideoIntelligenceServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return StreamingVideoIntelligenceServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return StreamingVideoIntelligenceServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return StreamingVideoIntelligenceServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return StreamingVideoIntelligenceServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return StreamingVideoIntelligenceServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return StreamingVideoIntelligenceServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected StreamingVideoIntelligenceServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for StreamingVideoIntelligenceServiceSettings. */ + public static class Builder + extends ClientSettings.Builder { + protected Builder() throws IOException { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(StreamingVideoIntelligenceServiceStubSettings.newBuilder(clientContext)); + } + + private static Builder createDefault() { + return new Builder(StreamingVideoIntelligenceServiceStubSettings.newBuilder()); + } + + protected Builder(StreamingVideoIntelligenceServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(StreamingVideoIntelligenceServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + public StreamingVideoIntelligenceServiceStubSettings.Builder getStubSettingsBuilder() { + return ((StreamingVideoIntelligenceServiceStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to streamingAnnotateVideo. */ + public StreamingCallSettings.Builder< + StreamingAnnotateVideoRequest, StreamingAnnotateVideoResponse> + streamingAnnotateVideoSettings() { + return getStubSettingsBuilder().streamingAnnotateVideoSettings(); + } + + @Override + public StreamingVideoIntelligenceServiceSettings build() throws IOException { + return new StreamingVideoIntelligenceServiceSettings(this); + } + } +} diff --git a/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoIntelligenceServiceClient.java b/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoIntelligenceServiceClient.java new file mode 100644 index 000000000000..7b199a4c816e --- /dev/null +++ b/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoIntelligenceServiceClient.java @@ -0,0 +1,328 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.videointelligence.v1p3beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.videointelligence.v1p3beta1.stub.VideoIntelligenceServiceStub; +import com.google.cloud.videointelligence.v1p3beta1.stub.VideoIntelligenceServiceStubSettings; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND SERVICE +/** + * Service Description: Service that implements Google Cloud Video Intelligence API. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

+ * 
+ * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = VideoIntelligenceServiceClient.create()) {
+ *   String inputUri = "gs://demomaker/cat.mp4";
+ *   Feature featuresElement = Feature.LABEL_DETECTION;
+ *   List<Feature> features = Arrays.asList(featuresElement);
+ *   AnnotateVideoResponse response = videoIntelligenceServiceClient.annotateVideoAsync(inputUri, features).get();
+ * }
+ * 
+ * 
+ * + *

Note: close() needs to be called on the videoIntelligenceServiceClient object to clean up + * resources such as threads. In the example above, try-with-resources is used, which automatically + * calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of + * VideoIntelligenceServiceSettings to create(). For example: + * + *

To customize credentials: + * + *

+ * 
+ * VideoIntelligenceServiceSettings videoIntelligenceServiceSettings =
+ *     VideoIntelligenceServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * VideoIntelligenceServiceClient videoIntelligenceServiceClient =
+ *     VideoIntelligenceServiceClient.create(videoIntelligenceServiceSettings);
+ * 
+ * 
+ * + * To customize the endpoint: + * + *
+ * 
+ * VideoIntelligenceServiceSettings videoIntelligenceServiceSettings =
+ *     VideoIntelligenceServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * VideoIntelligenceServiceClient videoIntelligenceServiceClient =
+ *     VideoIntelligenceServiceClient.create(videoIntelligenceServiceSettings);
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class VideoIntelligenceServiceClient implements BackgroundResource { + private final VideoIntelligenceServiceSettings settings; + private final VideoIntelligenceServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of VideoIntelligenceServiceClient with default settings. */ + public static final VideoIntelligenceServiceClient create() throws IOException { + return create(VideoIntelligenceServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of VideoIntelligenceServiceClient, using the given settings. The + * channels are created based on the settings passed in, or defaults for any settings that are not + * set. + */ + public static final VideoIntelligenceServiceClient create( + VideoIntelligenceServiceSettings settings) throws IOException { + return new VideoIntelligenceServiceClient(settings); + } + + /** + * Constructs an instance of VideoIntelligenceServiceClient, using the given stub for making + * calls. This is for advanced usage - prefer to use VideoIntelligenceServiceSettings}. + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final VideoIntelligenceServiceClient create(VideoIntelligenceServiceStub stub) { + return new VideoIntelligenceServiceClient(stub); + } + + /** + * Constructs an instance of VideoIntelligenceServiceClient, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected VideoIntelligenceServiceClient(VideoIntelligenceServiceSettings settings) + throws IOException { + this.settings = settings; + this.stub = ((VideoIntelligenceServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected VideoIntelligenceServiceClient(VideoIntelligenceServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final VideoIntelligenceServiceSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public VideoIntelligenceServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Performs asynchronous video annotation. Progress and results can be retrieved through the + * `google.longrunning.Operations` interface. `Operation.metadata` contains + * `AnnotateVideoProgress` (progress). `Operation.response` contains `AnnotateVideoResponse` + * (results). + * + *

Sample code: + * + *


+   * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = VideoIntelligenceServiceClient.create()) {
+   *   String inputUri = "gs://demomaker/cat.mp4";
+   *   Feature featuresElement = Feature.LABEL_DETECTION;
+   *   List<Feature> features = Arrays.asList(featuresElement);
+   *   AnnotateVideoResponse response = videoIntelligenceServiceClient.annotateVideoAsync(inputUri, features).get();
+   * }
+   * 
+ * + * @param inputUri Input video location. Currently, only [Google Cloud + * Storage](https://cloud.google.com/storage/) URIs are supported, which must be specified in + * the following format: `gs://bucket-id/object-id` (other URI formats return + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more + * information, see [Request URIs](/storage/docs/reference-uris). A video URI may include + * wildcards in `object-id`, and thus identify multiple videos. Supported wildcards: '*' + * to match 0 or more characters; '?' to match 1 character. If unset, the input video should + * be embedded in the request as `input_content`. If set, `input_content` should be unset. + * @param features Requested video annotation features. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture annotateVideoAsync( + String inputUri, List features) { + + AnnotateVideoRequest request = + AnnotateVideoRequest.newBuilder().setInputUri(inputUri).addAllFeatures(features).build(); + return annotateVideoAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Performs asynchronous video annotation. Progress and results can be retrieved through the + * `google.longrunning.Operations` interface. `Operation.metadata` contains + * `AnnotateVideoProgress` (progress). `Operation.response` contains `AnnotateVideoResponse` + * (results). + * + *

Sample code: + * + *


+   * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = VideoIntelligenceServiceClient.create()) {
+   *   String inputUri = "gs://demomaker/cat.mp4";
+   *   Feature featuresElement = Feature.LABEL_DETECTION;
+   *   List<Feature> features = Arrays.asList(featuresElement);
+   *   AnnotateVideoRequest request = AnnotateVideoRequest.newBuilder()
+   *     .setInputUri(inputUri)
+   *     .addAllFeatures(features)
+   *     .build();
+   *   AnnotateVideoResponse response = videoIntelligenceServiceClient.annotateVideoAsync(request).get();
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture annotateVideoAsync( + AnnotateVideoRequest request) { + return annotateVideoOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Performs asynchronous video annotation. Progress and results can be retrieved through the + * `google.longrunning.Operations` interface. `Operation.metadata` contains + * `AnnotateVideoProgress` (progress). `Operation.response` contains `AnnotateVideoResponse` + * (results). + * + *

Sample code: + * + *


+   * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = VideoIntelligenceServiceClient.create()) {
+   *   String inputUri = "gs://demomaker/cat.mp4";
+   *   Feature featuresElement = Feature.LABEL_DETECTION;
+   *   List<Feature> features = Arrays.asList(featuresElement);
+   *   AnnotateVideoRequest request = AnnotateVideoRequest.newBuilder()
+   *     .setInputUri(inputUri)
+   *     .addAllFeatures(features)
+   *     .build();
+   *   OperationFuture<AnnotateVideoResponse, AnnotateVideoProgress> future = videoIntelligenceServiceClient.annotateVideoOperationCallable().futureCall(request);
+   *   // Do something
+   *   AnnotateVideoResponse response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable + annotateVideoOperationCallable() { + return stub.annotateVideoOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Performs asynchronous video annotation. Progress and results can be retrieved through the + * `google.longrunning.Operations` interface. `Operation.metadata` contains + * `AnnotateVideoProgress` (progress). `Operation.response` contains `AnnotateVideoResponse` + * (results). + * + *

Sample code: + * + *


+   * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = VideoIntelligenceServiceClient.create()) {
+   *   String inputUri = "gs://demomaker/cat.mp4";
+   *   Feature featuresElement = Feature.LABEL_DETECTION;
+   *   List<Feature> features = Arrays.asList(featuresElement);
+   *   AnnotateVideoRequest request = AnnotateVideoRequest.newBuilder()
+   *     .setInputUri(inputUri)
+   *     .addAllFeatures(features)
+   *     .build();
+   *   ApiFuture<Operation> future = videoIntelligenceServiceClient.annotateVideoCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable annotateVideoCallable() { + return stub.annotateVideoCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoIntelligenceServiceSettings.java b/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoIntelligenceServiceSettings.java new file mode 100644 index 000000000000..4bb1d40dbfa0 --- /dev/null +++ b/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/VideoIntelligenceServiceSettings.java @@ -0,0 +1,197 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.videointelligence.v1p3beta1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.videointelligence.v1p3beta1.stub.VideoIntelligenceServiceStubSettings; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link VideoIntelligenceServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (videointelligence.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. For + * example, to set the total timeout of annotateVideoAsync to 30 seconds: + * + *

+ * 
+ * VideoIntelligenceServiceSettings.Builder videoIntelligenceServiceSettingsBuilder =
+ *     VideoIntelligenceServiceSettings.newBuilder();
+ * videoIntelligenceServiceSettingsBuilder.annotateVideoSettings().getRetrySettings().toBuilder()
+ *     .setTotalTimeout(Duration.ofSeconds(30));
+ * VideoIntelligenceServiceSettings videoIntelligenceServiceSettings = videoIntelligenceServiceSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class VideoIntelligenceServiceSettings + extends ClientSettings { + /** Returns the object with the settings used for calls to annotateVideo. */ + public UnaryCallSettings annotateVideoSettings() { + return ((VideoIntelligenceServiceStubSettings) getStubSettings()).annotateVideoSettings(); + } + + /** Returns the object with the settings used for calls to annotateVideo. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings + annotateVideoOperationSettings() { + return ((VideoIntelligenceServiceStubSettings) getStubSettings()) + .annotateVideoOperationSettings(); + } + + public static final VideoIntelligenceServiceSettings create( + VideoIntelligenceServiceStubSettings stub) throws IOException { + return new VideoIntelligenceServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return VideoIntelligenceServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return VideoIntelligenceServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return VideoIntelligenceServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return VideoIntelligenceServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return VideoIntelligenceServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return VideoIntelligenceServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return VideoIntelligenceServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected VideoIntelligenceServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for VideoIntelligenceServiceSettings. */ + public static class Builder + extends ClientSettings.Builder { + protected Builder() throws IOException { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(VideoIntelligenceServiceStubSettings.newBuilder(clientContext)); + } + + private static Builder createDefault() { + return new Builder(VideoIntelligenceServiceStubSettings.newBuilder()); + } + + protected Builder(VideoIntelligenceServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(VideoIntelligenceServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + public VideoIntelligenceServiceStubSettings.Builder getStubSettingsBuilder() { + return ((VideoIntelligenceServiceStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to annotateVideo. */ + public UnaryCallSettings.Builder annotateVideoSettings() { + return getStubSettingsBuilder().annotateVideoSettings(); + } + + /** Returns the builder for the settings used for calls to annotateVideo. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + AnnotateVideoRequest, AnnotateVideoResponse, AnnotateVideoProgress> + annotateVideoOperationSettings() { + return getStubSettingsBuilder().annotateVideoOperationSettings(); + } + + @Override + public VideoIntelligenceServiceSettings build() throws IOException { + return new VideoIntelligenceServiceSettings(this); + } + } +} diff --git a/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/package-info.java b/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/package-info.java new file mode 100644 index 000000000000..63c9e753b03c --- /dev/null +++ b/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/package-info.java @@ -0,0 +1,55 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A client to Cloud Video Intelligence API. + * + *

The interfaces provided are listed below, along with usage samples. + * + *

============================== VideoIntelligenceServiceClient ============================== + * + *

Service Description: Service that implements Google Cloud Video Intelligence API. + * + *

Sample for VideoIntelligenceServiceClient: + * + *

+ * 
+ * try (VideoIntelligenceServiceClient videoIntelligenceServiceClient = VideoIntelligenceServiceClient.create()) {
+ *   String inputUri = "gs://demomaker/cat.mp4";
+ *   Feature featuresElement = Feature.LABEL_DETECTION;
+ *   List<Feature> features = Arrays.asList(featuresElement);
+ *   AnnotateVideoResponse response = videoIntelligenceServiceClient.annotateVideoAsync(inputUri, features);
+ * }
+ * 
+ * 
+ * + * ======================================= StreamingVideoIntelligenceServiceClient + * ======================================= + * + *

Service Description: Service that implements Google Cloud Video Intelligence Streaming API. + * + *

Sample for StreamingVideoIntelligenceServiceClient: + * + *

+ * 
+ * try (StreamingVideoIntelligenceServiceClient streamingVideoIntelligenceServiceClient = StreamingVideoIntelligenceServiceClient.create()) {
+ *   StreamingAnnotateVideoRequest request = StreamingAnnotateVideoRequest.newBuilder().build();
+ *   StreamingAnnotateVideoResponse response = streamingVideoIntelligenceServiceClient.streamingAnnotateVideoCallable(request);
+ * }
+ * 
+ * 
+ */ +package com.google.cloud.videointelligence.v1p3beta1; diff --git a/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/GrpcStreamingVideoIntelligenceServiceCallableFactory.java b/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/GrpcStreamingVideoIntelligenceServiceCallableFactory.java new file mode 100644 index 000000000000..a4b66f1b70a7 --- /dev/null +++ b/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/GrpcStreamingVideoIntelligenceServiceCallableFactory.java @@ -0,0 +1,116 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.videointelligence.v1p3beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC callable factory implementation for Cloud Video Intelligence API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator") +@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") +public class GrpcStreamingVideoIntelligenceServiceCallableFactory + implements GrpcStubCallableFactory { + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings pagedCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable( + grpcCallSettings, pagedCallSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings batchingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, batchingCallSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings operationCallSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, operationCallSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } +} diff --git a/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/GrpcStreamingVideoIntelligenceServiceStub.java b/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/GrpcStreamingVideoIntelligenceServiceStub.java new file mode 100644 index 000000000000..645a4f8d4a46 --- /dev/null +++ b/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/GrpcStreamingVideoIntelligenceServiceStub.java @@ -0,0 +1,157 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.videointelligence.v1p3beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest; +import com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC stub implementation for Cloud Video Intelligence API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public class GrpcStreamingVideoIntelligenceServiceStub + extends StreamingVideoIntelligenceServiceStub { + + private static final MethodDescriptor< + StreamingAnnotateVideoRequest, StreamingAnnotateVideoResponse> + streamingAnnotateVideoMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName( + "google.cloud.videointelligence.v1p3beta1.StreamingVideoIntelligenceService/StreamingAnnotateVideo") + .setRequestMarshaller( + ProtoUtils.marshaller(StreamingAnnotateVideoRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(StreamingAnnotateVideoResponse.getDefaultInstance())) + .build(); + + private final BackgroundResource backgroundResources; + + private final BidiStreamingCallable + streamingAnnotateVideoCallable; + + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcStreamingVideoIntelligenceServiceStub create( + StreamingVideoIntelligenceServiceStubSettings settings) throws IOException { + return new GrpcStreamingVideoIntelligenceServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcStreamingVideoIntelligenceServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcStreamingVideoIntelligenceServiceStub( + StreamingVideoIntelligenceServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcStreamingVideoIntelligenceServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcStreamingVideoIntelligenceServiceStub( + StreamingVideoIntelligenceServiceStubSettings.newBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of GrpcStreamingVideoIntelligenceServiceStub, using the given settings. + * This is protected so that it is easy to make a subclass, but otherwise, the static factory + * methods should be preferred. + */ + protected GrpcStreamingVideoIntelligenceServiceStub( + StreamingVideoIntelligenceServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcStreamingVideoIntelligenceServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcStreamingVideoIntelligenceServiceStub, using the given settings. + * This is protected so that it is easy to make a subclass, but otherwise, the static factory + * methods should be preferred. + */ + protected GrpcStreamingVideoIntelligenceServiceStub( + StreamingVideoIntelligenceServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + GrpcCallSettings + streamingAnnotateVideoTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(streamingAnnotateVideoMethodDescriptor) + .build(); + + this.streamingAnnotateVideoCallable = + callableFactory.createBidiStreamingCallable( + streamingAnnotateVideoTransportSettings, + settings.streamingAnnotateVideoSettings(), + clientContext); + + backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public BidiStreamingCallable + streamingAnnotateVideoCallable() { + return streamingAnnotateVideoCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/GrpcVideoIntelligenceServiceCallableFactory.java b/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/GrpcVideoIntelligenceServiceCallableFactory.java new file mode 100644 index 000000000000..ca38bdb1b541 --- /dev/null +++ b/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/GrpcVideoIntelligenceServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.videointelligence.v1p3beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC callable factory implementation for Cloud Video Intelligence API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator") +@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") +public class GrpcVideoIntelligenceServiceCallableFactory implements GrpcStubCallableFactory { + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings pagedCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable( + grpcCallSettings, pagedCallSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings batchingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, batchingCallSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings operationCallSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, operationCallSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } +} diff --git a/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/GrpcVideoIntelligenceServiceStub.java b/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/GrpcVideoIntelligenceServiceStub.java new file mode 100644 index 000000000000..226374c38a3f --- /dev/null +++ b/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/GrpcVideoIntelligenceServiceStub.java @@ -0,0 +1,171 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.videointelligence.v1p3beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress; +import com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest; +import com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC stub implementation for Cloud Video Intelligence API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public class GrpcVideoIntelligenceServiceStub extends VideoIntelligenceServiceStub { + + private static final MethodDescriptor + annotateVideoMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.videointelligence.v1p3beta1.VideoIntelligenceService/AnnotateVideo") + .setRequestMarshaller( + ProtoUtils.marshaller(AnnotateVideoRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + + private final UnaryCallable annotateVideoCallable; + private final OperationCallable< + AnnotateVideoRequest, AnnotateVideoResponse, AnnotateVideoProgress> + annotateVideoOperationCallable; + + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcVideoIntelligenceServiceStub create( + VideoIntelligenceServiceStubSettings settings) throws IOException { + return new GrpcVideoIntelligenceServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcVideoIntelligenceServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcVideoIntelligenceServiceStub( + VideoIntelligenceServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcVideoIntelligenceServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcVideoIntelligenceServiceStub( + VideoIntelligenceServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcVideoIntelligenceServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcVideoIntelligenceServiceStub( + VideoIntelligenceServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcVideoIntelligenceServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcVideoIntelligenceServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcVideoIntelligenceServiceStub( + VideoIntelligenceServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings annotateVideoTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(annotateVideoMethodDescriptor) + .build(); + + this.annotateVideoCallable = + callableFactory.createUnaryCallable( + annotateVideoTransportSettings, settings.annotateVideoSettings(), clientContext); + this.annotateVideoOperationCallable = + callableFactory.createOperationCallable( + annotateVideoTransportSettings, + settings.annotateVideoOperationSettings(), + clientContext, + this.operationsStub); + + backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + annotateVideoOperationCallable() { + return annotateVideoOperationCallable; + } + + public UnaryCallable annotateVideoCallable() { + return annotateVideoCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/StreamingVideoIntelligenceServiceStub.java b/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/StreamingVideoIntelligenceServiceStub.java new file mode 100644 index 000000000000..5ee4e0ceeb71 --- /dev/null +++ b/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/StreamingVideoIntelligenceServiceStub.java @@ -0,0 +1,42 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.videointelligence.v1p3beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest; +import com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Base stub class for Cloud Video Intelligence API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public abstract class StreamingVideoIntelligenceServiceStub implements BackgroundResource { + + public BidiStreamingCallable + streamingAnnotateVideoCallable() { + throw new UnsupportedOperationException("Not implemented: streamingAnnotateVideoCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/StreamingVideoIntelligenceServiceStubSettings.java b/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/StreamingVideoIntelligenceServiceStubSettings.java new file mode 100644 index 000000000000..4c6a21dc6d19 --- /dev/null +++ b/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/StreamingVideoIntelligenceServiceStubSettings.java @@ -0,0 +1,269 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.videointelligence.v1p3beta1.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest; +import com.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link StreamingVideoIntelligenceServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (videointelligence.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. For + * example, to set the total timeout of streamingAnnotateVideoCallable to 30 seconds: + * + *

+ * 
+ * StreamingVideoIntelligenceServiceStubSettings.Builder streamingVideoIntelligenceServiceSettingsBuilder =
+ *     StreamingVideoIntelligenceServiceStubSettings.newBuilder();
+ * streamingVideoIntelligenceServiceSettingsBuilder.streamingAnnotateVideoSettings().getRetrySettings().toBuilder()
+ *     .setTotalTimeout(Duration.ofSeconds(30));
+ * StreamingVideoIntelligenceServiceStubSettings streamingVideoIntelligenceServiceSettings = streamingVideoIntelligenceServiceSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class StreamingVideoIntelligenceServiceStubSettings + extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final StreamingCallSettings + streamingAnnotateVideoSettings; + + /** Returns the object with the settings used for calls to streamingAnnotateVideo. */ + public StreamingCallSettings + streamingAnnotateVideoSettings() { + return streamingAnnotateVideoSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public StreamingVideoIntelligenceServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcStreamingVideoIntelligenceServiceStub.create(this); + } else { + throw new UnsupportedOperationException( + "Transport not supported: " + getTransportChannelProvider().getTransportName()); + } + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "videointelligence.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", + GaxProperties.getLibraryVersion(StreamingVideoIntelligenceServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected StreamingVideoIntelligenceServiceStubSettings(Builder settingsBuilder) + throws IOException { + super(settingsBuilder); + + streamingAnnotateVideoSettings = settingsBuilder.streamingAnnotateVideoSettings().build(); + } + + /** Builder for StreamingVideoIntelligenceServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + + private final StreamingCallSettings.Builder< + StreamingAnnotateVideoRequest, StreamingAnnotateVideoResponse> + streamingAnnotateVideoSettings; + + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "idempotent", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(10800000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(10800000L)) + .setTotalTimeout(Duration.ofMillis(10800000L)) + .build(); + definitions.put("default", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + streamingAnnotateVideoSettings = StreamingCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = ImmutableList.>of(); + + initDefaults(this); + } + + private static Builder createDefault() { + Builder builder = new Builder((ClientContext) null); + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + + return builder; + } + + protected Builder(StreamingVideoIntelligenceServiceStubSettings settings) { + super(settings); + + streamingAnnotateVideoSettings = settings.streamingAnnotateVideoSettings.toBuilder(); + + unaryMethodSettingsBuilders = ImmutableList.>of(); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to streamingAnnotateVideo. */ + public StreamingCallSettings.Builder< + StreamingAnnotateVideoRequest, StreamingAnnotateVideoResponse> + streamingAnnotateVideoSettings() { + return streamingAnnotateVideoSettings; + } + + @Override + public StreamingVideoIntelligenceServiceStubSettings build() throws IOException { + return new StreamingVideoIntelligenceServiceStubSettings(this); + } + } +} diff --git a/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/VideoIntelligenceServiceStub.java b/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/VideoIntelligenceServiceStub.java new file mode 100644 index 000000000000..1d70af85feff --- /dev/null +++ b/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/VideoIntelligenceServiceStub.java @@ -0,0 +1,56 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.videointelligence.v1p3beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress; +import com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest; +import com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Base stub class for Cloud Video Intelligence API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public abstract class VideoIntelligenceServiceStub implements BackgroundResource { + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + annotateVideoOperationCallable() { + throw new UnsupportedOperationException("Not implemented: annotateVideoOperationCallable()"); + } + + public UnaryCallable annotateVideoCallable() { + throw new UnsupportedOperationException("Not implemented: annotateVideoCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/VideoIntelligenceServiceStubSettings.java b/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/VideoIntelligenceServiceStubSettings.java new file mode 100644 index 000000000000..82f5a2a3b75e --- /dev/null +++ b/google-cloud-clients/google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1p3beta1/stub/VideoIntelligenceServiceStubSettings.java @@ -0,0 +1,322 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.videointelligence.v1p3beta1.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress; +import com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest; +import com.google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link VideoIntelligenceServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (videointelligence.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. For + * example, to set the total timeout of annotateVideoAsync to 30 seconds: + * + *

+ * 
+ * VideoIntelligenceServiceStubSettings.Builder videoIntelligenceServiceSettingsBuilder =
+ *     VideoIntelligenceServiceStubSettings.newBuilder();
+ * videoIntelligenceServiceSettingsBuilder.annotateVideoSettings().getRetrySettings().toBuilder()
+ *     .setTotalTimeout(Duration.ofSeconds(30));
+ * VideoIntelligenceServiceStubSettings videoIntelligenceServiceSettings = videoIntelligenceServiceSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class VideoIntelligenceServiceStubSettings + extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings annotateVideoSettings; + private final OperationCallSettings< + AnnotateVideoRequest, AnnotateVideoResponse, AnnotateVideoProgress> + annotateVideoOperationSettings; + + /** Returns the object with the settings used for calls to annotateVideo. */ + public UnaryCallSettings annotateVideoSettings() { + return annotateVideoSettings; + } + + /** Returns the object with the settings used for calls to annotateVideo. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings + annotateVideoOperationSettings() { + return annotateVideoOperationSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public VideoIntelligenceServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcVideoIntelligenceServiceStub.create(this); + } else { + throw new UnsupportedOperationException( + "Transport not supported: " + getTransportChannelProvider().getTransportName()); + } + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "videointelligence.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(VideoIntelligenceServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected VideoIntelligenceServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + annotateVideoSettings = settingsBuilder.annotateVideoSettings().build(); + annotateVideoOperationSettings = settingsBuilder.annotateVideoOperationSettings().build(); + } + + /** Builder for VideoIntelligenceServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + + private final UnaryCallSettings.Builder annotateVideoSettings; + private final OperationCallSettings.Builder< + AnnotateVideoRequest, AnnotateVideoResponse, AnnotateVideoProgress> + annotateVideoOperationSettings; + + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "idempotent", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(2.5) + .setMaxRetryDelay(Duration.ofMillis(120000L)) + .setInitialRpcTimeout(Duration.ofMillis(120000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(120000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("default", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + annotateVideoSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + annotateVideoOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(annotateVideoSettings); + + initDefaults(this); + } + + private static Builder createDefault() { + Builder builder = new Builder((ClientContext) null); + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + + builder + .annotateVideoSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder + .annotateVideoOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(AnnotateVideoResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(AnnotateVideoProgress.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(20000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) // ignored + .setRpcTimeoutMultiplier(1.0) // ignored + .setMaxRpcTimeout(Duration.ZERO) // ignored + .setTotalTimeout(Duration.ofMillis(86400000L)) + .build())); + + return builder; + } + + protected Builder(VideoIntelligenceServiceStubSettings settings) { + super(settings); + + annotateVideoSettings = settings.annotateVideoSettings.toBuilder(); + annotateVideoOperationSettings = settings.annotateVideoOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(annotateVideoSettings); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to annotateVideo. */ + public UnaryCallSettings.Builder annotateVideoSettings() { + return annotateVideoSettings; + } + + /** Returns the builder for the settings used for calls to annotateVideo. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + AnnotateVideoRequest, AnnotateVideoResponse, AnnotateVideoProgress> + annotateVideoOperationSettings() { + return annotateVideoOperationSettings; + } + + @Override + public VideoIntelligenceServiceStubSettings build() throws IOException { + return new VideoIntelligenceServiceStubSettings(this); + } + } +} diff --git a/google-cloud-clients/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p3beta1/MockStreamingVideoIntelligenceService.java b/google-cloud-clients/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p3beta1/MockStreamingVideoIntelligenceService.java new file mode 100644 index 000000000000..cb31e97325f4 --- /dev/null +++ b/google-cloud-clients/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p3beta1/MockStreamingVideoIntelligenceService.java @@ -0,0 +1,57 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.videointelligence.v1p3beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.GeneratedMessageV3; +import io.grpc.ServerServiceDefinition; +import java.util.List; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockStreamingVideoIntelligenceService implements MockGrpcService { + private final MockStreamingVideoIntelligenceServiceImpl serviceImpl; + + public MockStreamingVideoIntelligenceService() { + serviceImpl = new MockStreamingVideoIntelligenceServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(GeneratedMessageV3 response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-clients/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p3beta1/MockStreamingVideoIntelligenceServiceImpl.java b/google-cloud-clients/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p3beta1/MockStreamingVideoIntelligenceServiceImpl.java new file mode 100644 index 000000000000..1f57cd15f2d8 --- /dev/null +++ b/google-cloud-clients/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p3beta1/MockStreamingVideoIntelligenceServiceImpl.java @@ -0,0 +1,89 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.videointelligence.v1p3beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.videointelligence.v1p3beta1.StreamingVideoIntelligenceServiceGrpc.StreamingVideoIntelligenceServiceImplBase; +import com.google.protobuf.GeneratedMessageV3; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockStreamingVideoIntelligenceServiceImpl + extends StreamingVideoIntelligenceServiceImplBase { + private ArrayList requests; + private Queue responses; + + public MockStreamingVideoIntelligenceServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(GeneratedMessageV3 response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public StreamObserver streamingAnnotateVideo( + final StreamObserver responseObserver) { + final Object response = responses.remove(); + StreamObserver requestObserver = + new StreamObserver() { + @Override + public void onNext(StreamingAnnotateVideoRequest value) { + if (response instanceof StreamingAnnotateVideoResponse) { + responseObserver.onNext((StreamingAnnotateVideoResponse) response); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void onError(Throwable t) { + responseObserver.onError(t); + } + + @Override + public void onCompleted() { + responseObserver.onCompleted(); + } + }; + return requestObserver; + } +} diff --git a/google-cloud-clients/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p3beta1/MockVideoIntelligenceService.java b/google-cloud-clients/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p3beta1/MockVideoIntelligenceService.java new file mode 100644 index 000000000000..3fa2e6af91a2 --- /dev/null +++ b/google-cloud-clients/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p3beta1/MockVideoIntelligenceService.java @@ -0,0 +1,57 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.videointelligence.v1p3beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.GeneratedMessageV3; +import io.grpc.ServerServiceDefinition; +import java.util.List; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockVideoIntelligenceService implements MockGrpcService { + private final MockVideoIntelligenceServiceImpl serviceImpl; + + public MockVideoIntelligenceService() { + serviceImpl = new MockVideoIntelligenceServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(GeneratedMessageV3 response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-clients/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p3beta1/MockVideoIntelligenceServiceImpl.java b/google-cloud-clients/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p3beta1/MockVideoIntelligenceServiceImpl.java new file mode 100644 index 000000000000..62dce68db766 --- /dev/null +++ b/google-cloud-clients/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p3beta1/MockVideoIntelligenceServiceImpl.java @@ -0,0 +1,74 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.videointelligence.v1p3beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceGrpc.VideoIntelligenceServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.GeneratedMessageV3; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockVideoIntelligenceServiceImpl extends VideoIntelligenceServiceImplBase { + private ArrayList requests; + private Queue responses; + + public MockVideoIntelligenceServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(GeneratedMessageV3 response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void annotateVideo( + AnnotateVideoRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext((Operation) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/google-cloud-clients/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoIntelligenceServiceClientTest.java b/google-cloud-clients/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoIntelligenceServiceClientTest.java new file mode 100644 index 000000000000..6f718a8597ab --- /dev/null +++ b/google-cloud-clients/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoIntelligenceServiceClientTest.java @@ -0,0 +1,135 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.videointelligence.v1p3beta1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.grpc.testing.MockStreamObserver; +import com.google.api.gax.rpc.ApiStreamObserver; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import io.grpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.ExecutionException; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@javax.annotation.Generated("by GAPIC") +public class StreamingVideoIntelligenceServiceClientTest { + private static MockVideoIntelligenceService mockVideoIntelligenceService; + private static MockStreamingVideoIntelligenceService mockStreamingVideoIntelligenceService; + private static MockServiceHelper serviceHelper; + private StreamingVideoIntelligenceServiceClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockVideoIntelligenceService = new MockVideoIntelligenceService(); + mockStreamingVideoIntelligenceService = new MockStreamingVideoIntelligenceService(); + serviceHelper = + new MockServiceHelper( + "in-process-1", + Arrays.asList( + mockVideoIntelligenceService, mockStreamingVideoIntelligenceService)); + serviceHelper.start(); + } + + @AfterClass + public static void stopServer() { + serviceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + serviceHelper.reset(); + channelProvider = serviceHelper.createChannelProvider(); + StreamingVideoIntelligenceServiceSettings settings = + StreamingVideoIntelligenceServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = StreamingVideoIntelligenceServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + @SuppressWarnings("all") + public void streamingAnnotateVideoTest() throws Exception { + String annotationResultsUri = "annotationResultsUri-238075757"; + StreamingAnnotateVideoResponse expectedResponse = + StreamingAnnotateVideoResponse.newBuilder() + .setAnnotationResultsUri(annotationResultsUri) + .build(); + mockStreamingVideoIntelligenceService.addResponse(expectedResponse); + StreamingAnnotateVideoRequest request = StreamingAnnotateVideoRequest.newBuilder().build(); + + MockStreamObserver responseObserver = + new MockStreamObserver<>(); + + BidiStreamingCallable callable = + client.streamingAnnotateVideoCallable(); + ApiStreamObserver requestObserver = + callable.bidiStreamingCall(responseObserver); + + requestObserver.onNext(request); + requestObserver.onCompleted(); + + List actualResponses = responseObserver.future().get(); + Assert.assertEquals(1, actualResponses.size()); + Assert.assertEquals(expectedResponse, actualResponses.get(0)); + } + + @Test + @SuppressWarnings("all") + public void streamingAnnotateVideoExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockStreamingVideoIntelligenceService.addException(exception); + StreamingAnnotateVideoRequest request = StreamingAnnotateVideoRequest.newBuilder().build(); + + MockStreamObserver responseObserver = + new MockStreamObserver<>(); + + BidiStreamingCallable callable = + client.streamingAnnotateVideoCallable(); + ApiStreamObserver requestObserver = + callable.bidiStreamingCall(responseObserver); + + requestObserver.onNext(request); + + try { + List actualResponses = responseObserver.future().get(); + Assert.fail("No exception thrown"); + } catch (ExecutionException e) { + Assert.assertTrue(e.getCause() instanceof InvalidArgumentException); + InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } +} diff --git a/google-cloud-clients/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p3beta1/VideoIntelligenceServiceClientTest.java b/google-cloud-clients/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p3beta1/VideoIntelligenceServiceClientTest.java new file mode 100644 index 000000000000..23fe7cc06e58 --- /dev/null +++ b/google-cloud-clients/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p3beta1/VideoIntelligenceServiceClientTest.java @@ -0,0 +1,134 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.videointelligence.v1p3beta1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.GeneratedMessageV3; +import io.grpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.ExecutionException; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@javax.annotation.Generated("by GAPIC") +public class VideoIntelligenceServiceClientTest { + private static MockVideoIntelligenceService mockVideoIntelligenceService; + private static MockStreamingVideoIntelligenceService mockStreamingVideoIntelligenceService; + private static MockServiceHelper serviceHelper; + private VideoIntelligenceServiceClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockVideoIntelligenceService = new MockVideoIntelligenceService(); + mockStreamingVideoIntelligenceService = new MockStreamingVideoIntelligenceService(); + serviceHelper = + new MockServiceHelper( + "in-process-1", + Arrays.asList( + mockVideoIntelligenceService, mockStreamingVideoIntelligenceService)); + serviceHelper.start(); + } + + @AfterClass + public static void stopServer() { + serviceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + serviceHelper.reset(); + channelProvider = serviceHelper.createChannelProvider(); + VideoIntelligenceServiceSettings settings = + VideoIntelligenceServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = VideoIntelligenceServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + @SuppressWarnings("all") + public void annotateVideoTest() throws Exception { + AnnotateVideoResponse expectedResponse = AnnotateVideoResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("annotateVideoTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockVideoIntelligenceService.addResponse(resultOperation); + + String inputUri = "gs://demomaker/cat.mp4"; + Feature featuresElement = Feature.LABEL_DETECTION; + List features = Arrays.asList(featuresElement); + + AnnotateVideoResponse actualResponse = client.annotateVideoAsync(inputUri, features).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockVideoIntelligenceService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AnnotateVideoRequest actualRequest = (AnnotateVideoRequest) actualRequests.get(0); + + Assert.assertEquals(inputUri, actualRequest.getInputUri()); + Assert.assertEquals(features, actualRequest.getFeaturesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void annotateVideoExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockVideoIntelligenceService.addException(exception); + + try { + String inputUri = "gs://demomaker/cat.mp4"; + Feature featuresElement = Feature.LABEL_DETECTION; + List features = Arrays.asList(featuresElement); + + client.annotateVideoAsync(inputUri, features).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } +} diff --git a/google-cloud-clients/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p3beta1/VideoIntelligenceServiceSmokeTest.java b/google-cloud-clients/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p3beta1/VideoIntelligenceServiceSmokeTest.java new file mode 100644 index 000000000000..e95e91f5abb0 --- /dev/null +++ b/google-cloud-clients/google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p3beta1/VideoIntelligenceServiceSmokeTest.java @@ -0,0 +1,66 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.videointelligence.v1p3beta1; + +import com.google.common.base.Preconditions; +import java.util.Arrays; +import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.junit.Test; + +@javax.annotation.Generated("by GAPIC") +public class VideoIntelligenceServiceSmokeTest { + private static final String PROJECT_ENV_NAME = "GOOGLE_CLOUD_PROJECT"; + private static final String LEGACY_PROJECT_ENV_NAME = "GCLOUD_PROJECT"; + + @Test + public void run() { + main(null); + } + + public static void main(String args[]) { + Logger.getLogger("").setLevel(Level.WARNING); + try { + executeNoCatch(); + System.out.println("OK"); + } catch (Exception e) { + System.err.println("Failed with exception:"); + e.printStackTrace(System.err); + System.exit(1); + } + } + + public static void executeNoCatch() throws Exception { + try (VideoIntelligenceServiceClient client = VideoIntelligenceServiceClient.create()) { + String inputUri = "gs://demomaker/cat.mp4"; + Feature featuresElement = Feature.LABEL_DETECTION; + List features = Arrays.asList(featuresElement); + + AnnotateVideoResponse response = client.annotateVideoAsync(inputUri, features).get(); + } + } + + private static String getProjectId() { + String projectId = System.getProperty(PROJECT_ENV_NAME, System.getenv(PROJECT_ENV_NAME)); + if (projectId == null) { + projectId = + System.getProperty(LEGACY_PROJECT_ENV_NAME, System.getenv(LEGACY_PROJECT_ENV_NAME)); + } + Preconditions.checkArgument(projectId != null, "A project ID is required."); + return projectId; + } +} diff --git a/google-cloud-clients/google-cloud-video-intelligence/synth.metadata b/google-cloud-clients/google-cloud-video-intelligence/synth.metadata index dd2b34ed0cab..d7e6f718dbdc 100644 --- a/google-cloud-clients/google-cloud-video-intelligence/synth.metadata +++ b/google-cloud-clients/google-cloud-video-intelligence/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-03-01T08:57:22.045725Z", + "updateTime": "2019-03-12T17:39:54.262454Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.14", - "dockerImage": "googleapis/artman@sha256:f3d61ae45abaeefb6be5f228cda22732c2f1b00fb687c79c4bd4f2c42bb1e1a7" + "version": "0.16.16", + "dockerImage": "googleapis/artman@sha256:30babbfce7f05a62b1892c63c575aa2c8c502eb4bcc8f3bb90ec83e955d5d319" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "41d72d444fbe445f4da89e13be02078734fb7875", - "internalRef": "236230004" + "sha": "abd1c9a99c5cd7179d8e5e0c8d4c8e761054cc78", + "internalRef": "237945492" } } ], @@ -67,6 +67,16 @@ "generator": "gapic", "config": "google/cloud/videointelligence/artman_videointelligence_v1p2beta1.yaml" } + }, + { + "client": { + "source": "googleapis", + "apiName": "video-intelligence", + "apiVersion": "v1p3beta1", + "language": "java", + "generator": "gapic", + "config": "google/cloud/videointelligence/artman_videointelligence_v1p3beta1.yaml" + } } ] } \ No newline at end of file diff --git a/google-cloud-clients/google-cloud-video-intelligence/synth.py b/google-cloud-clients/google-cloud-video-intelligence/synth.py index 2d29b508c24b..aaf60372b325 100644 --- a/google-cloud-clients/google-cloud-video-intelligence/synth.py +++ b/google-cloud-clients/google-cloud-video-intelligence/synth.py @@ -21,7 +21,7 @@ gapic = gcp.GAPICGenerator() service = 'video-intelligence' -versions = ['v1', 'v1beta1', 'v1beta2', 'v1p1beta1', 'v1p2beta1'] +versions = ['v1', 'v1beta1', 'v1beta2', 'v1p1beta1', 'v1p2beta1', 'v1p3beta1'] config_pattern = '/google/cloud/videointelligence/artman_videointelligence_{version}.yaml' for version in versions: diff --git a/versions.txt b/versions.txt index 7ac4814f306d..22870c7dd649 100644 --- a/versions.txt +++ b/versions.txt @@ -110,6 +110,7 @@ grpc-google-cloud-video-intelligence-v1beta1:0.48.0:0.48.1-SNAPSHOT grpc-google-cloud-video-intelligence-v1beta2:0.48.0:0.48.1-SNAPSHOT grpc-google-cloud-video-intelligence-v1p1beta1:0.48.0:0.48.1-SNAPSHOT grpc-google-cloud-video-intelligence-v1p2beta1:0.48.0:0.48.1-SNAPSHOT +grpc-google-cloud-video-intelligence-v1p3beta1:0.48.0:0.48.1-SNAPSHOT grpc-google-cloud-vision-v1:1.47.0:1.47.1-SNAPSHOT grpc-google-cloud-vision-v1p1beta1:0.48.0:0.48.1-SNAPSHOT grpc-google-cloud-vision-v1p2beta1:1.47.0:1.47.1-SNAPSHOT @@ -165,6 +166,7 @@ proto-google-cloud-video-intelligence-v1beta1:0.48.0:0.48.1-SNAPSHOT proto-google-cloud-video-intelligence-v1beta2:0.48.0:0.48.1-SNAPSHOT proto-google-cloud-video-intelligence-v1p1beta1:0.48.0:0.48.1-SNAPSHOT proto-google-cloud-video-intelligence-v1p2beta1:0.48.0:0.48.1-SNAPSHOT +proto-google-cloud-video-intelligence-v1p3beta1:0.48.0:0.48.1-SNAPSHOT proto-google-cloud-vision-v1:1.47.0:1.47.1-SNAPSHOT proto-google-cloud-vision-v1p1beta1:0.48.0:0.48.1-SNAPSHOT proto-google-cloud-vision-v1p2beta1:1.47.0:1.47.1-SNAPSHOT From 3ae90f7cb0c68e316cbc658d1a9d03585caa1db9 Mon Sep 17 00:00:00 2001 From: Kristen O'Leary Date: Tue, 12 Mar 2019 14:19:10 -0400 Subject: [PATCH 2/2] Fix code formatting. --- .../videointelligence/v1p3beta1/LabelDetectionConfig.java | 6 ++++-- .../videointelligence/v1p3beta1/StreamingVideoConfig.java | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelDetectionConfig.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelDetectionConfig.java index 0a3c4a7a9c4c..290baa79ad98 100644 --- a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelDetectionConfig.java +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/LabelDetectionConfig.java @@ -224,7 +224,8 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (labelDetectionMode_ != com.google.cloud.videointelligence.v1p3beta1.LabelDetectionMode - .LABEL_DETECTION_MODE_UNSPECIFIED.getNumber()) { + .LABEL_DETECTION_MODE_UNSPECIFIED + .getNumber()) { output.writeEnum(1, labelDetectionMode_); } if (stationaryCamera_ != false) { @@ -244,7 +245,8 @@ public int getSerializedSize() { size = 0; if (labelDetectionMode_ != com.google.cloud.videointelligence.v1p3beta1.LabelDetectionMode - .LABEL_DETECTION_MODE_UNSPECIFIED.getNumber()) { + .LABEL_DETECTION_MODE_UNSPECIFIED + .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, labelDetectionMode_); } if (stationaryCamera_ != false) { diff --git a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoConfig.java b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoConfig.java index 92be6b93dd0b..797bee67af74 100644 --- a/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoConfig.java +++ b/google-api-grpc/proto-google-cloud-video-intelligence-v1p3beta1/src/main/java/com/google/cloud/videointelligence/v1p3beta1/StreamingVideoConfig.java @@ -576,7 +576,8 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (feature_ != com.google.cloud.videointelligence.v1p3beta1.StreamingFeature - .STREAMING_FEATURE_UNSPECIFIED.getNumber()) { + .STREAMING_FEATURE_UNSPECIFIED + .getNumber()) { output.writeEnum(1, feature_); } if (streamingConfigCase_ == 2) { @@ -617,7 +618,8 @@ public int getSerializedSize() { size = 0; if (feature_ != com.google.cloud.videointelligence.v1p3beta1.StreamingFeature - .STREAMING_FEATURE_UNSPECIFIED.getNumber()) { + .STREAMING_FEATURE_UNSPECIFIED + .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, feature_); } if (streamingConfigCase_ == 2) {